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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Round Function In SQL.

Author  Topic 

hspatil31
Posting Yak Master

182 Posts

Posted - 2011-01-28 : 01:06:07
Dear All,

Make sure that value have always 4 decimal digits.
For example, rate 0.0045637 should be rounded to 0.0046.
Similarly, rate of 0.02 should be 0.0200.

Thanks and Reagards
Harish Patil

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2011-01-28 : 01:12:05
cast (.02 as Numeric(8,4))
Go to Top of Page

hspatil31
Posting Yak Master

182 Posts

Posted - 2011-01-28 : 02:58:55
Thanks a lot i solved this issue.
Go to Top of Page

bhdijkstra
Starting Member

24 Posts

Posted - 2011-03-10 : 03:56:45
and what about numbers i.e. hours which are longer:

CASE (dbo.xxx.xxx as Numeric(8,4)) is not working for this. please help.

thanks.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-03-10 : 04:09:07
quote:
Originally posted by bhdijkstra

and what about numbers i.e. hours which are longer:

CASE (dbo.xxx.xxx as Numeric(8,4)) is not working for this. please help.

thanks.



what is not working ? example ?

you can also use round( <number>, 4) to round it to 4 decimal places


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

bhdijkstra
Starting Member

24 Posts

Posted - 2011-03-10 : 04:22:38
thank you, that is what i needed.
Go to Top of Page
   

- Advertisement -