Re: [firebird-support] Arithmetic overflow or division by zero has occurred.

2012-03-29 Thread Ismael L. Donis Garcia
Perfect 1 million of thanks = || ISMAEL || = - Original Message - From: Huan Ruan To: firebird-support@yahoogroups.com Sent: Thursday, March 29, 2012 5:13 PM Subject: Re: [firebird-support] Arithmetic overflow or division by zero has occurred. On 30

Re: [firebird-support] Arithmetic overflow or division by zero has occurred.

2012-03-29 Thread Huan Ruan
On 30 March 2012 03:21, Ismael L. Donis Garcia wrote: > ** > > > That operation does not give the precision that I need ( 6 digits after > decimal point ) > > SELECT 54311.999455*cast((1/1.01) as integer) as mount FROM > MON$ATTACHMENTS r = 54311.999455 > > 54311.999455 / 1.01 = 54311,9451

Re: [firebird-support] Arithmetic overflow or division by zero has occurred.

2012-03-29 Thread Ismael L. Donis Garcia
|| = - Original Message - From: Svein Erling Tysvær To: 'firebird-support@yahoogroups.com' Sent: Thursday, March 29, 2012 3:24 AM Subject: RE: [firebird-support] Arithmetic overflow or division by zero has occurred. >SELECT cast((5411.000455/0.20) as numeric(16,6))

RE: [firebird-support] Arithmetic overflow or division by zero has occurred.

2012-03-29 Thread Svein Erling Tysvær
>SELECT cast((5411.000455/0.20) as numeric(16,6)) as mount FROM >MON$ATTACHMENTS r This particular query can be rewritten as SELECT 5411.000455*cast(1/0.20 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.

[firebird-support] Arithmetic overflow or division by zero has occurred.

2012-03-28 Thread Ismael L. Donis Garcia
FB 2.5.1 superclasic SELECT cast((5411.000455/0.20) as numeric(16,6)) as mount FROM MON$ATTACHMENTS r *** IBPP::SQLException *** Context: Statement::Fetch Message: isc_dsql_fetch failed. SQL Message : -802 Arithmetic overflow or division by zero has occurred. Engine Code: 335544321 Engi