Subject | Re: Arithmetics problem (Firebird 1.0.3 WI-V6.2.972) |
---|---|
Author | semprolbat |
Post date | 2004-06-06T19:56:35Z |
--- In firebird-support@yahoogroups.com, Milan Babuskov <milanb@k...>
wrote:
expression within the cast returned integers as well -> status quo. ;-
)
Adding .00's to all the numbers did the trick.
Thanks for the amazingly quick answer!
Magnus
wrote:
> semprolbat wrote:Ok. I tried casting the whole statement as numeric, but of course the
> > Why is it that
> > select (1 / 100) from rdb$database;
> > Returns 0 and not 0,01?
>
> Because the result of operation on two integers is integer.
>
> You can use:
>
> 1.00/100.00
>
> or
>
> use cast to cast values to appropriate type.
expression within the cast returned integers as well -> status quo. ;-
)
Adding .00's to all the numbers did the trick.
Thanks for the amazingly quick answer!
Magnus