How to round off numbers in SQL Server database -


i have column (named percentagedifference) numbers have decimal places shown below:

percentagedifference  1.886792452830100 2.325581395348800 2.758620689655100 -3.689320388349500 -0.284900284900200 0.400000000000000 

i want query round off numbers nearest 10 , leave 2 decimal places. here output looking for:

percentagedifference     1.89     2.33     2.76    -3.69    -0.28     0.40 

i have tried use round function not giving me expected results:

select round([percentage difference], 2, 1) table 

how can achieved?

you need cast:

select cast([percentage difference] decimal(19,2)) table; 

Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -