Subject Re: [firebird-support] query Integer overflow
Author Mr. John
the error is gone if I cast one of the values as integer (at this moment there is no decimal needed for that field):

instead of 


 SELECT   b.cant*  IIF(b.PR_EAT_T<>0, b.PR_EAT_T-b.PR_EAT_T   *  CAST (b.P_TV_E AS INTEGER)   /(100+   CAST (b.P_TV_E AS INTEGER)    ), b.PR_I)
                 FROM GS_FIED a INNER JOIN GS_FIEP b on

On Sunday, June 23, 2019, 12:42:42 AM GMT+3, Dimitry Sibiryakov sd@... [firebird-support] <> wrote:

22.06.2019 21:47, 'Mr. John' mr_johnmr@... [firebird-support] wrote:

> I'm facing with this error on FB 2.5.8(latest stable version)/ W10 x64

  My advice is "never perform calculations (especially multiplication and division) in SQL".
  Your expression has result of type NUMERIC(18,14) and result of calculation is bigger
than 9999.

  WBR, SD.




Visit and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at


Yahoo Groups Links

<*> To visit your group on the web, go to:

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    (Yahoo! ID required)

<*> To change settings via email:

<*> To unsubscribe from this group, send an email to:

<*> Your use of Yahoo Groups is subject to: