Now that you mention it -- try running the query in dbaccess and isql -- see
if
the resulting column isn't way too narrow, normally a SUM() will be
something like
decimal(16), but this gives (if memory serves) decimal(6);
. We had the same problem, worked around with something like
SUM(column + 1000 - 1000). Apparently the summation inside bumped up the
column
width.
I believe Informix has a patch for this, but no idea what to ask for.
> -----Original Message-----
> From: Rudy Fernandes [SMTP:rferdy@americasm01.nt.com]
> Sent: Monday, May 08, 2000 2:27 PM
> To: informix-list@iiug.org
> Subject: Re: Informix Error Message
>
> I recall a problem like this in either 7.1x or 7.2x. As far as I recall,
> it
> was a bug. In effect, if the resultant SUM exceeded the maximum value
> storeable in the base column by a factor of 10, the error was returned.
>
> As you can guess, we resolved the problem by increasing the size of the
> base column. You can try the same
>
> HTH
> Rudy
>
> guinep@my-deja.com wrote:
>
> > Hi,
> >
> > I am using Informix Dynamic Server 7.2. The database error -1226
> > "Decimal or money value exceeds maximum precision" is generated when an
> > SQL query of the following type is executed:
> >
> > select sum(....) + sum(....)
> > from table1, table2
> > where <join condition>
> > and <column> between date1 and date2
> >
> > The maximum value that could be calulated does NOT exceed the
> > maximum precision. Furthermore, attempts to sum the data for say,
> > January 1 thru January 16, succeed, but the sum for January 1 thru
> > January 17 fails. The sum for January 17 succeeds.
> >
> > Could the table be corrupted?
> >
> > If anyone could help with this problem, I would be very grateful. Please
> > email guinep@my-deja.com.
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.