Reputation: 1480
How could I go about using a case statement to set column final, based on column S?
The objective is to use any record that has a final, and also include any records from column S only if S = 'Clogged' and set final to 'pending'.
CASE R.S When 'Clogged' Then 'Pending' as [Result] ELSE R.Final as [Result] End
CASE R.FINAL WHEN R.S = 'CLogged' Then 'Pending' ELSE R.Final END as [Result]
Upvotes: 0
Views: 35
Reputation: 171421
CASE WHEN R.S = 'Clogged' Then 'Pending' ELSE R.Final END as [Result]
Upvotes: 1