smknox
Hall of Fame
Points: 3275
More actions
August 25, 2006 at 9:48 am
#115115
I would like to concantenate a column of type text with another column of type varchar. When I try
t.ColVarchar + ' ' + t.ColText
I get an error because I can't use "+" with a text field. Is there any way around this?
Sam
Gopi Muluka
SSCarpal Tunnel
Points: 4594
August 25, 2006 at 10:30 am
#656869
try this
t.ColVarchar + ' ' + convert(varchar,t.ColText)
August 25, 2006 at 11:37 am
#656891
thanks. that did it!
Shawn Wilson
Ten Centuries
Points: 1271
August 25, 2006 at 2:52 pm
#656953
that only seemed to do it. if you have text > 8k you will get truncation.
Look in BOL for UPDATETEXT which will handle what you're actually asking for.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply