Please start any new threads on our new site at 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 

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
the result will be 3.28

can u pls help me in this


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

Premature Yak Congratulator

22864 Posts

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


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

- Advertisement -