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
 SQL Server Development (2000)
 Convert numeric to varchar

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-07-15 : 08:24:04
sammy writes "I have a print statement that should print a numeric variable (@vol), but the decimal place is taken out and the value is rounded to the nearest whole number. How can i convert to a varchar (I have to convert to print) but print the exact value in the variable?"

Nazim
A custom title

1408 Posts

Posted - 2002-07-15 : 08:30:11
cast(@var as varchar(20))

HTH

-------------------------
What lies behind you and what lies ahead of you are small matters compared to what lies within you.-Ralph Waldo Emerson
Go to Top of Page
   

- Advertisement -