Subject | Re: [ib-support] How to split a number |
---|---|
Author | Svein Erling Tysvær |
Post date | 2001-02-13T15:38:42Z |
SELECT CAST(<number>-0.5 as Integer)
FROM <table>
Cast rounds to the nearest whole number, to truncate you have to subtract
0,5 (if not 5,75 would end up as 6).
Set
At 14:43 13.02.2001 -0000, you wrote:
FROM <table>
Cast rounds to the nearest whole number, to truncate you have to subtract
0,5 (if not 5,75 would end up as 6).
Set
At 14:43 13.02.2001 -0000, you wrote:
>Hi All.Sorry for the below advert - I didn't insert it ;o}
>Again here.
>
>Please list:
>How to extract the integer part of a numeric field??????
>
>eg:
>If I have let say: 5,75
>I'd like to split in 5 and 0,75.
>Final: What is( if exist ) the equivalent of int and frac of Delphi?
>
>TIA
>Arnaldo