Re: Simple question!
Posted in 1998
This is a multi-part message in MIME format.
--------------73F57AE482244E21C751F5AA
Content-Type: text/plain; charset=us-ascii
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Transfer-Encoding: 7bit
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?
>
> Thanks
> Neil
try
SELECT round(num1,1), round(num2,1), round(num1/num2,1) num3 from table1
where .............
there's also a trunc() function
regards
claus
--------------73F57AE482244E21C751F5AA
Content-Type: text/x-vcard; charset=us-ascii; name="vcard.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Claus Samuelsen
Content-Disposition: attachment; filename="vcard.vcf"
begin: vcard
fn: Claus Samuelsen
n: Samuelsen;Claus
org: Avenir Danmark A/S
adr: Gydevang 22 B;;;DK-3450 Aller'd;;;Denmark
email;internet: csa@avenir.dk
title: Systems Manager
tel;work: +45 4814 3000
tel;fax: +45 4814 3011
tel;home: +45 2083 4999
x-mozilla-cpt: ;0
x-mozilla-html: FALSE
end: vcard
--------------73F57AE482244E21C751F5AA--