Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i need to round the number.

for example if the number resulted in 2333.7


and after applied round to 2333.7 it should give result in 2334.


please help . i used round(2333.7,0) it will result 2333 i need 2334
Posted

Um.
I just tried it:
SQL
SELECT ROUND(2333.7, 0)As '0.7', ROUND (2333.4,0) as '0.4'

The results:
0.7	0.4
2334.0	2333.0

So I would check my inputs if I was you...

[edit]Where did the XML code block come form? - OriginalGriff[/edit]
 
Share this answer
 
v2
I have also tried it, no problem in your syntax.
it is working

anyway you can also create your own function
 
Share this answer
 
Comments
balongi 24-Jul-12 0:34am    
problem is solved.. actual i need to convert the value .. now its done
May be you want this.

SQL
select convert(int,round(2333.49,0))as '2333.49',convert(int,round(2333.50,0))as '2333.50'


Result is:


SQL
2333.49  2333.50
 2333	  2334



This will be help properly
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900