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.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Problem in round() function
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 11/18/2010 :  00:39:58  Show Profile  Reply with Quote
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


Flowing Fount of Yak Knowledge

8781 Posts

Posted - 11/18/2010 :  03:30:22  Show Profile  Visit webfred's Homepage  Reply with Quote
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 - 11/18/2010 :  05:38:01  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
Select cast(@fltQs as decimal(12,2))


Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000