RE: Query for decimal part
Posted in 2003
Thanks John and Preetinder,
It worked both ways :
Select * from table
where (amount-trunc(amount)) <> 0
Select * from table
Where (round(amount,0)*100 - amount * 100)!=0'
Both generated the same results.
Thank you very much !!
-----Mensaje original-----
De: preetinder dhaliwal [mailto:preetinder.dhaliwal@dhl.com]
Enviado el: Jueves, 21 de Agosto de 2003 11:29 a.m.
Para: Francisco Roldan
CC: informix-list@iiug.org
Asunto: Re: Query for decimal part
Hi,
Try something like this -
select * from rep_data where
(round(adr_cr_limit,0) * 100 - adr_cr_limit * 100) != 0
( 100 because my col is decimal 2 )
Rgds
Preetinder
Francisco Roldan wrote:
>Hi Everybody,
>I got a table with a column named amount
>of type decimal(26,8) .
>I need to make a query to select the rows
>with no-integers values on this column (amount).
>I mean the rows with decimal part on its value.
>
>Something like this :
>
>select * from shclog
>where get_decimals(amount) <> 0>
>Assuming that the function get_decimals return the
>decimal part of the column amount.
>
>Does exist a function like this ?
>
>Thanks in advance
>sending to informix-list
>
>
sending to informix-list