Re: [firebird-support] strange bahaviour
Hallo, Il 04/07/2019 11:21, Svein Erling Tysvær setys...@gmail.com [firebird-support] ha scritto: If you were using dialect 1, I would say the difference would be expected (since NUMERIC(18) is equal to DOUBLE PRECISION in dialect 1), but I guess you're using dialect 3? Yes, I use dialect 3 on FB 2.5.8.27089 Luigi Siciliano --
Re: [firebird-support] strange bahaviour
If you were using dialect 1, I would say the difference would be expected (since NUMERIC(18) is equal to DOUBLE PRECISION in dialect 1), but I guess you're using dialect 3? What do you get if you run: SELECT ID, IMPORTO - TRUNC(IMPORTO), PAGATO - TRUNC(PAGATO) FROM ELENCO_SCADENZE Is the problem the same after UPDATE ELENCO_SCADENZE SET IMPORTO = TRUNC(IMPORTO, 2) HTH, Set ons. 3. jul. 2019 kl. 17:27 skrev Luigi Siciliano luigi...@tiscalinet.it [firebird-support] : > > > Hallo, > Il 03/07/2019 16:35, liviuslivius liviusliv...@poczta.onet.pl > [firebird-support] ha scritto: > > > What are the exact types of both fields? > > NUMERIC(18,4) via domain: > > CREATE DOMAIN CURRENCY_D > AS Numeric(18,4) > DEFAULT 0.00 > NOT NULL > ; > Thanks. > -- > > Luigi Siciliano > -- > > > >
Re: [firebird-support] strange bahaviour
Hallo, Il 03/07/2019 16:35, liviuslivius liviusliv...@poczta.onet.pl [firebird-support] ha scritto: What are the exact types of both fields? NUMERIC(18,4) via domain: CREATE DOMAIN CURRENCY_D AS Numeric(18,4) DEFAULT 0.00 NOT NULL ; Thanks. -- Luigi Siciliano --
Re: [firebird-support] strange bahaviour
What are the exact types of both fields?Regards,Karol Bieniaszewski null
[firebird-support] strange bahaviour
I have this query: select id, importo, pagato from elenco_scadenze where (importo - pagato) <> 0.00 and this results: ID IMPORTO PAGATO 29 60,0016 60,00 90 569,8344 569,83 If I do this: UPDATE ELENCO_SCADENZE set IMPORTO = CAST(IMPORTO AS DECIMAL(18,2)) the result of the query changes but is a mistake because the result must be _no rows_ : ID IMPORTO PAGATO 29 60,00 60,00 90 569,83 569,83 Why? Thanks. -- Luigi Siciliano --