expertsit
asked on
Appending two strings in SQL
I would like to update a column in a table with a string. Later on I would like to add to that string.
I tried the following query,
"update TABLE1 set COLUMN1 = COLUMN1 + 'TEST STRING' where ID = 100"
I get this error, "Invalid operator for data type. Operator equals add, type equals text."
The 'COLUMN1' is of type text.
Any help is appreciated.
thanks,
I tried the following query,
"update TABLE1 set COLUMN1 = COLUMN1 + 'TEST STRING' where ID = 100"
I get this error, "Invalid operator for data type. Operator equals add, type equals text."
The 'COLUMN1' is of type text.
Any help is appreciated.
thanks,
ASKER
I cannot change the design of the table. I dont have rights. Is it not possible to add two text fields?
thanks,
thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. That worked.
>Is it not possible to add two text fields?
as shown it is possible, but you will only get up to 8000 characters in that field. if you try to store more, it will get truncated...
as shown it is possible, but you will only get up to 8000 characters in that field. if you try to store more, it will get truncated...
do you need to have TEXT as data type?
is varchar(8000) in sql server 2000 resp varchar(max) in sql server 2005 not enough?