Subject | Re: select records from within the last hour |
---|---|
Author | csswa |
Post date | 2002-07-25T14:43:36Z |
--- In ib-support@y..., Ralf Grenzing <ralfgspam@g...> wrote:
1/24 would otherwise result in zero (integer divided by integer; no
fractions permitted < 1). Adding precision to the 1 forces the engine
to treat it as a floating value instead of an integer, and therefore
the result will also be a float.
Andrew Ferguson
> And why I have to use many zeros? For casting reasons I guess? Buttherefore
> one is enough, isnĀ“ it? And It works as well without any zero?!?Because of the way dialect 3 handles integer division.
1/24 would otherwise result in zero (integer divided by integer; no
fractions permitted < 1). Adding precision to the 1 forces the engine
to treat it as a floating value instead of an integer, and therefore
the result will also be a float.
> > where TStamp >= current_timestamp - (1.0000000/24)Regards,
Andrew Ferguson