Re: Simple question!
Posted in 1998
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
On Tue, 25 Aug 1998, Neil Truby wrote:
> I can't find this in TFM anywhere:
>
> SELECT num1, num2, num1/num2 num3 from table1
> where .............>
> If num1 and num2 are decimals with value 12345.67890 and 98765.43210,
> how can I alter the above statement so num1, num2 and num3 appear with
> (say) 1 decimal place only?
SELECT num1, num2, ROUND(num1/num2, 1) num3
FROM table1
WHERE ...
Yours,
Jonathan Leffler (jleffler@informix.com) #include <witticism.h>
Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN
Informix IDN for D4GL & Linux -- http://www.informix.com/idn