-1
Declare @qt varchar(5)
Declare @xmlt xml
 set @qt = '''

I am unable to store a single quote in a variable, I need to concatenate before and after a column like below

update #TEMP_TABLE2
set XMLDatat =CONCAT(@qt,@xmlt,@qt)

So i have a single quote before and after the column

Kumar
  • 11
  • 7

1 Answers1

0

You can try the following query.

Declare @qt varchar(5)
Declare @xmlt xml
SET @qt = ''''
SET @xmlt ='Sample XML'

UPDATE #TEMP_TABLE2
SET XMLDatat = CONCAT(@qt,CAST(@xmlt AS VARCHAR(MAX)),@qt)

Thanks.

Emdad
  • 822
  • 7
  • 14