Re: float to integer?
Posted in 1994
Mieke,
try the following:
create table ttt (col1 decimal(12,4));
insert into ttt values (123.4567);
insert into ttt values (23.85678);
insert into ttt values (3.456789);
select round(col1) rounded,col1
from ttt
;
rounded col1
123 123.4567
24 23.8568
3 3.4568
>
> Ok, so there are a few possibilities:
> - The large shelf of manuals above my desk isn't large enough yet
> - It's an undocumented bug^H^H^H feature
> - it's just not there
>
> Can anybody help me out:
>
> ----> How does one round a float number to an integer in Informix?
>
> That is, without pulling any fancy tricks or a do-it-yourself
> routine, but plain and simple a *function* (or is that too much to ask?)
>
>
> Thanks, Mieke.
>
--
regards,
+----------------------------------------------------------------------------+
| . . | |
| ... ... | Bob Baskett |
| ..... ..... | Software Engineer, DBA |
| .. ... .. | Business Systems Integration Group |
| . . . | Semiconductor Products Sector |
| | Mesa, AZ |
| Motorola, Inc. | |
|----------------------------------------------------------------------------|
| 'connectionLESS IS MORE' -- Data Broker |
|----------------------------------------------------------------------------|
| Duct tape is like the force. It has a light side, and a dark side, and |
| it holds the universe together ... |
| -- Carl Zwanzig |
+----------------------------------------------------------------------------+