sahana
SSCrazy
Points: 2530
More actions
June 16, 2005 at 1:47 pm
#69110
HOW can I limit the number 1.2345678 to 1.23
Thanks.
Si
SSCommitted
Points: 1537
June 17, 2005 at 5:43 am
#566369
Not 100% sure of the datatype youre talking about but you could try...
select convert (decimal(16,2), columnname) from tablename
16=max number of digits before and after the decimal point
2=number of digits after the decimal point
Nancy Simon
SSC Veteran
Points: 216
June 17, 2005 at 8:05 am
#566419
Try one of the following:
floor (1.2345678 * 100) / 100
round (1.2345678, 2)
With this example they give the same answers, but if you use 8.7654321, the first one will return 8.76 while the second returns 8.77.
Hope this helps.
- Nancy
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply