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
 Transact-SQL (2000)
 Rounding Up
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jonny1409
Posting Yak Master

133 Posts

Posted - 11/15/2007 :  16:20:08  Show Profile  Reply with Quote
Hello,

I have the following line in my stored procedure :

SET @ErrMSG = 'Employee : ' + STR(@Employee) + ' Only Has ' + STR(@AllowanceLeft) + ' days left to take.'


When I debug through to the @AllowanceLeft part, it shows as 2.5000
However, this message displays it as 3.

How do I stop it rounding up please ?

tkizer
Almighty SQL Goddess

USA
37287 Posts

Posted - 11/15/2007 :  16:38:15  Show Profile  Visit tkizer's Homepage  Reply with Quote
What do these show:

SELECT @AllowanceLeft
SELECT STR(@AllowanceLeft)

And what is the datatype of @AllowanceLeft?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Jonny1409
Posting Yak Master

133 Posts

Posted - 11/16/2007 :  03:07:58  Show Profile  Reply with Quote
Hi tkizer, both of these show 2.50000000, and the datatype is float.
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.08 seconds. Powered By: Snitz Forums 2000