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 |
notsosuper
Posting Yak Master
190 Posts |
Posted - 2005-06-08 : 13:05:03
|
if I want to display this value to always last digit 9 how can I do that? cost + %10 + it should always be 9 222 + 22 = 244 right I want to display 249 , always 9 should be in the end no matter how much I need to add to the value. |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-06-08 : 13:08:50
|
SELECT CEILING((222 + 22) /10.0)*10-1 |
 |
|
notsosuper
Posting Yak Master
190 Posts |
Posted - 2005-06-08 : 13:16:45
|
where is this function? it is not sql right? |
 |
|
notsosuper
Posting Yak Master
190 Posts |
Posted - 2005-06-08 : 13:18:42
|
please ignore my last reply |
 |
|
notsosuper
Posting Yak Master
190 Posts |
Posted - 2005-06-08 : 13:28:04
|
IS this function will give me value of 249? |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-06-08 : 13:49:12
|
Why not try it and see? It worked for me. |
 |
|
notsosuper
Posting Yak Master
190 Posts |
Posted - 2005-06-08 : 14:14:06
|
thank you it works!! |
 |
|
|
|
|