(Resolved) Update Table Using Case
I am trying to do an update with the Case Statment and from everything I have read this should work.
Code:
UPDATE tblCouponRedeptionData_Old
Set MarketingLabel = CASE
WHEN 'East' THEN 'East - 2'
WHEN 'West' THEN 'West - 2'
WHEN 'South' THEN 'South - 2'
ELSE MarketingLabel
End
I am getting this error: An expression of non-boolean type specified in a context where a condition is expected, near 'THEN'.
What am I doing wrong?
Re: Update Table Using Case
You did not specify a condition for the Case statement
Code:
Set MarketingLabel = CASE MarketingLabel
WHEN 'East' THEN 'East - 2'
WHEN 'West' THEN 'West - 2'
WHEN 'South' THEN 'South - 2'
ELSE MarketingLabel
Re: Update Table Using Case