Subject Re: [ib-support] Rounding function?
Author Joe Martinez
For some reason, this didn't work for me. The target data type is double
precision. When I do this, however, the target field still goes out to
more than 2 decimal places. However, the following DID work:

set field1 = cast ((cast ((field2*100) as integer)) / 100 as double precision)

Any idea why casting to an integer would work, but not to a numeric
(18,2)? BTW, I'm using FB 1.0, dialect 1.

-Joe

At 12:33 PM 2/5/2003 +0500, you wrote:
>Joe
>
> >>update mytable
> >>set field1=cast(field1 as numeric (18,2) )
> >>
> >>
> >
> >Will that work if the target field is a float?
> >
>Try.
>I used cast to round double precision.
>
>Kubanych.
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>