Click here to Skip to main content
16,018,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to round my Amount value from Decimal to Integer Format using sql query.

If amount 65.33 then amount=65

If amount 65.53 then amount=66

I tried with round function. but not getting expected result.

I am a fresher.please help.Thanks in advance
Posted
Updated 19-Jan-15 22:20pm
v2
Comments
Tomas Takac 20-Jan-15 4:14am    
What does it mean that Round() didn't work properly?

1 solution

Round works fine for me:
SQL
SELECT 65.33, ROUND(65.33, 0),65.53, ROUND(65.53, 0)

Generates:
65.33	65.00	65.53	66.00

How is what I am doing different from what you are doing?
 
Share this answer
 

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