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.
| Author |
Topic |
|
msv
Starting Member
9 Posts |
Posted - 2009-09-11 : 15:28:05
|
| I have a table which has a field with the character type TEXTand I am trying to insert a VARCHAR into the TEXT field.. how do i convert that Varchar to insert into a TEXT field???Example@ERror varchar(50)select @error = Field_1from table awhere abc = bcdinsert into B(msg)values (@error)i am getting an error |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2009-09-11 : 16:03:30
|
| I believe that there is an implicit conversion from varchar to text but you could always use the CAST or CONVERT functions. What error did you receive when you tried to perfrom your INSERT?=======================================Men build too many walls and not enough bridges. -Isaac Newton, philosopher and mathematician (1642-1727) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-09-13 : 13:49:49
|
| why use TEXT? its deprecated in sql 2005. Its better to use varchar(max) instead |
 |
|
|
|
|
|