Message info
To:\'\' From:Svein Erling Tysvær Subject:RE: [firebird-support] Arithmetic overflow or division by zero has occurred. Date:Thu, 29 Mar 2012 09:24:26 +0200


>SELECT cast((5411.000455/0.000020) as numeric(16,6)) as mount FROM MON$ATTACHMENTS r

This particular query can be rewritten as

SELECT 5411.000455*cast(1/0.000020 as integer) as mount FROM MON$ATTACHMENTS r

Though it will not work equally well with other numbers, at least not if cast(1/0.xxxxxx as numeric(16, 4)) doesn't yield sufficient precision when doing 5411.000455*ResultFromAbove.


Recent Activity:

Visit and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at