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
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Rounding Up
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

133 Posts

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

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 ?

Almighty SQL Goddess

38200 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
Go to Top of Page

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  
 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.17 seconds. Powered By: Snitz Forums 2000