Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Rounding Up

Author  Topic 

Jonny1409
Posting Yak Master

133 Posts

Posted - 2007-11-15 : 16:20:08
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

38200 Posts

Posted - 2007-11-15 : 16:38:15
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 - 2007-11-16 : 03:07:58
Hi tkizer, both of these show 2.50000000, and the datatype is float.
Go to Top of Page
   

- Advertisement -