Geeks With Blogs
Bunch's Blog One day I'll have a catchy subtitle, one day October 2011 Entries
To print multiple int variables on one line you need to CAST them first. Otherwise the PRINT command will add them up (at least it does for me anyways using SQL 2008). In the example I needed to have two ID variables print out while I was working on a sproc so I could see if I was getting the correct IDs before adding in my update code. This did not work, it adds the two variables together: PRINT @FirstID + ‘ – ‘ + @NextID This does work, it prints each variable with the dash in-between: PRINT CAST(@FirstID ......

Posted On Thursday, October 20, 2011 10:48 AM

Copyright © Bunch | Powered by: