Subject Re: [firebird-support] Double precision field problem
Author Svein Erling Tysvaer
With numbers not anywhere near any limits, I guess you could do

UPDATE T SET FIELD1 = CAST((FIELD1-FIELD2)*10000 as BIGINT)/10000.0000

Though I generally don't use double precision and simply do not know
whether things can be done simpler (or covering larger values) without
using a UDF.

Others will hopefully reply if that is possible,
Set

bill_lam wrote:
> For some reason, I prefer using double instead of exact numeric storage, usually
> it doesn't cause any problem because applications will take care of rounding
> error. But I also interested to know what is the firebird's correct syntax to do
> rounding up to 4 places after decimal? and does it need udf for the function round?
> update t set field1= round(field1-field2,4)