I am trying to write a select statement that concatenates a Varchar and Text
field into a Text.
So I basically want something like:
Select VarcharColumn + TextColumn from tablea
I know that I could convert the TextColumn to varchar(8000) and concatenate
that with the varchar column but there may be instances where the TextColumn
exceeds 8000 bytes. So I would need the datatype of this concatenated field
to be of type TEXT.
Any help would be appreciated.
Thanks
You will have to use UPDATETEXT to concatenate text columns. Check out the
details, syntax and examples of UPDATETEXT in SQL Server Books Online.
Anith
Friday, February 10, 2012
concatenating Varchar and Text
Labels:
basically,
concatenates,
concatenating,
database,
likeselect,
microsoft,
mysql,
oracle,
select,
server,
sql,
statement,
text,
textfield,
varchar,
varcharcolumn,
write
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment