Hi guys
May be concept around update is not that great or I am not doing it right. Please can I have an advise around this piece of code
Your help will be appreciated
What I am trying to do is this
"
update a
set updatedatetime=getutcdate(),
loyalty_program=(case when loyalty_program='ACTIVE' then customer_state='MOD' when loyalty_program='CANCELLED' then customer_state='REM' end) from customertable a
where customer_id=N'000000111'
"
This piece of code doesn't work , particularly it is not liking customer_state, if I put then 'MOD' it is fine but I need customer_state.
Please advise
Farhan Jamil