-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.

closed as off-topic by Tom V, Max Vernon, RolandoMySQLDBA, James Anderson, Paul White Apr 4 '16 at 20:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – Max Vernon, Paul White
If this question can be reworded to fit the rules in the help center, please edit the question.

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.