Does Vertica CASE statement (syntax form 2) recognize NULL values?
Sorry! I now see this was previously answered
How can I get Vertica CASE statement syntax form 2 to recognize NULL values?
For instance, the following query I would expect and prefer it to recode empty strings to
9 or even
8 but it falls through to the else clause and returns
7. Is this the expected behavior?
SELECT ( CASE status WHEN 'Yes' THEN 1 WHEN 'Reviewed and blocked' THEN 0 WHEN NULL THEN 9 WHEN '' THEN 8 ELSE 7 END ) AS coded, COUNT(*) AS freq FROM myschema.mytable GROUP BY 1