I want round the amount to nearest rupee.
I.e. if I got 225 as amount it must be treat as 230.
And if 224 it must treat as 220.
How can it be done using roundoff in T-SQL?
|
I want round the amount to nearest rupee. I.e. if I got 225 as amount it must be treat as 230. And if 224 it must treat as 220. How can it be done using |
||||
| show 1 more comment |
Questions on Database Administrators Stack Exchange are expected to relate to database administration within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
|
Hi you can use the "Round()" function. Eg: Select Round(224,-1) it returns the value 220 Select Round(225,-1) it retruns the value 230 refer the following link http://msdn.microsoft.com/en-us/library/ms175003.aspx |
|||
|
|
|
As the comments have stated you can use the ROUND() function
|
|||
|
|
When length is a **negative** number, numeric_expression is rounded on the left side of the decimal point, as specified by length.– ypercube Jun 23 '12 at 8:45