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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Problem in round() function

Author  Topic 

Mani2010
Starting Member

1 Post

Posted - 2010-11-18 : 00:39:58
DECLARE @w1int int,@intTE int,@fltQs float
SET @w1int =344
SET @intTE=105
SELECT @fltQs = @w1int/CONVERT(float,@intTE)

SELECT @fltQs --
Select round(@fltQs,2)


when i run this result is 3.2800000000000002

it need result should be 3.28


but when try this
Round(3.2761904761904761,2)
the result will be 3.28


can u pls help me in this

Regards,
Mani

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-11-18 : 03:30:22
Please have a look at what you have posted:
it need result should be 3.28

but when try this... ...the result will be 3.28

Please be more clear, thank you.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-11-18 : 05:38:01
Select cast(@fltQs as decimal(12,2))

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -