How to map numbers to significant decimal places in SQL Server?
Given that it MYFIELDhas a data type NUMERIC(38,10):
Presented result:
Select MYFIELD from MYTABLE:
1000.0000000000
1234.5600000000
2000.0000000000
Best result (halfway):
Select cast(MYFIELD as NUMERIC(38,2)) from MYTABLE:
1000.00
1234.56
2000.00
Desired Result:
Select ??? from MYTABLE:
1000
1234.56
2000
Thanks in advance.
source
share