For example I have the following query (see How to produce a result set based on the comparison of values between two fields?):
select id,
case nickname when '' then full_name else nickname end as new_name
from your_table
I’m getting a syntax error when I add the last line
select id,
case nickname when '' then full_name else nickname end as new_name
from your_table
where new_name = 'Jen'
Can I filter out the result set with a WHERE statement?
You’ll need to use a subquery: