Hi... In mytable I have:
COl1 Text
COL2 Varchar(255)
I am trying to concatenate the two together in an update statement for COL1.
I have tried:
and
Both options give me the error:
Invalid operator for data type. Operator equals add, type equals text.
Is there a different way I should go about this?
COl1 Text
COL2 Varchar(255)
I am trying to concatenate the two together in an update statement for COL1.
I have tried:
Code:
update mytable
set COL1 = COL1 + ' ' + convert(text, COL2)
and
Code:
update mytable
set COL1 = COL1 + ' ' cast(COL2 as text)
Both options give me the error:
Invalid operator for data type. Operator equals add, type equals text.
Is there a different way I should go about this?