Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
abhit_kumar
Posting Yak Master
147 Posts |
Posted - 2012-01-11 : 03:24:13
|
Hello All Experts,I have number like this:-1.051.03101.25101.21I want to round it as follow:-1.05=1.101.03=1.00101.25=101.30101.21=101.20Regards,AKM |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-11 : 03:27:33
|
ROUND(field,1)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
abhit_kumar
Posting Yak Master
147 Posts |
Posted - 2012-01-11 : 03:32:51
|
quote: Originally posted by visakh16 ROUND(field,1)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Thanks, But its not work in below scenario.SELECT ROUND('100.05',1)its give 100...which is incorrect..its should be 100.10 |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-11 : 03:53:02
|
SELECT CAST('100.05' AS decimal(30,1))------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
abhit_kumar
Posting Yak Master
147 Posts |
Posted - 2012-01-11 : 03:56:56
|
Thanks Visakh :) |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-01-11 : 03:58:23
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|