Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why don int4 based aggregates seem to work?

aggregates based int4
0
Posted

Why don int4 based aggregates seem to work?

0

Some Aggregates such as sum(int4) and avg(int4) return results using the numeric datatype. This is perfectly legal according to the SQL spec and is done to prevent overflows and other problems, but unfortunately Microsoft’s ActiveX Data Objects don’t seem to like it. There are two workarounds: • Cast the result to an int4 e.g. SELECT avg(fieldname)::int4 FROM tablename • Set the ADO CursorLocation to AdUseClient. Note: This will produce a read only recordset.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123