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 |
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2013-06-17 : 03:27:50
|
Hello,There is a formula in excel as follows:=IF(A5>0,ROUND(A5,-5)+100000,"")I would like to do the same in sql.For example:The number 500000 should give 600000The number 100000 should give the same 100000The number 1042112 should give 1100000The number 2301565 should give 2400000The number 1089903 should give 1200000The number 1362379 should give 1500000The number 813380 should give 900000... |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-17 : 03:36:04
|
NULLIF(CASE WHEN Field > 0 THEN ROUND(Field,-5) + 100000 ELSE 0 END,0)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
arkiboys
Master Smack Fu Yak Hacker
1433 Posts |
Posted - 2013-06-17 : 03:50:17
|
Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-06-17 : 03:53:43
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|