0

I am having trouble finding the correct syntax for updating this T-SQL table.

Here is my query which is adding an additional ' at the beginning and end.

Query:

  Update [denodo].[dbo].[wrappers]
  SET wrapperWhereClause = '''
  AND County_Input = ''Cheyenne & Arapaho Tribal Court'' 
  AND WrapperID = 729'''
  WHERE wrapperID = '729'

The Outcome here is:

'AND County_Input = 'Cheyenne & Arapaho Tribal Court' AND WrapperID = 729'

The Outcome I am hoping for:

AND County_Input = 'Cheyenne & Arapaho Tribal Court' AND WrapperID = 729

Can anyone help me edit this so I can receive the outcome I am hoping for?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

2 Answers2

2

Try this:

UPDATE [denodo].[dbo].[wrappers] 
SET wrapperWhereClause = 'AND County_Input=''Cheyenne & Arapaho Tribal Court'' AND WrapperID=729' 
WHERE wrapperID = '729'
0

Try this:

UPDATE [denodo].[dbo].[wrappers]
SET wrapperWhereClause = 'AND County_Input=''Cheyenne & Arapaho Tribal Court'' AND WrapperID=729'
WHERE wrapperID = '729
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459