Can you use wildcards in a CASE statement?
Summary:
I have an analysis where if the Job Name is like 'abc%', '%hpr%', then I want to display certain text. Note that there are multiple wildcards, some only before, some only after and some both before and after the text. Is it possible to use wildcards in a CASE statement? The below example returns a general syntax error. I would appreciate your recommendations.
CASE WHEN "Workforce Management - Worker Assignment Real Time"."Job"."Job Name" IN ('DIRECTOR%', 'CORPORATE DIRECTOR%') THEN 'Director'
WHEN "Workforce Management - Worker Assignment Real Time"."Job"."Job Name" IN ('CHIEF%', '%VICE%', '%VP%' ) THEN 'Executive'
Tagged:
0