-5
update ch1380.ComplexMiscLogic 
set logic = 'UNIDDisposition IN ('1','2','5')'
where misclogic = 11

An error is showing incorrect syntax on line one of the above update statement. Please can somebody explain why?

The RDBMS is SQL Server, ch1380 is my schema, ComplexMiscLogic is my table.

8
update ch1380.ComplexMiscLogic 
set logic = 'UNIDDisposition IN (''1'',''2'',''5'')'
where misclogic = 11

You need to escape your single quotation marks.

Not the answer you're looking for? Browse other questions tagged or ask your own question.