|
-
Oct 5th, 2007, 12:08 PM
#1
Thread Starter
Hyperactive Member
(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?
Last edited by FastEddie; Oct 5th, 2007 at 01:47 PM.
-
Oct 5th, 2007, 01:25 PM
#2
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
-
Oct 5th, 2007, 01:46 PM
#3
Thread Starter
Hyperactive Member
Re: Update Table Using Case
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|