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

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

Mani2010
Starting Member

India
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
Round(3.2761904761904761,2)
the result will be 3.28


can u pls help me in this

Regards,
Mani

webfred
Flowing Fount of Yak Knowledge

Germany
8765 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

madhivanan
Premature Yak Congratulator

India
22761 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))

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.06 seconds. Powered By: Snitz Forums 2000