Nested IFNULL and CASE Statement
Summary:
Hi All,
I'm trying to write a CASE statement where if the Annualised salary is blank I need it to say 'Not Reported'
Content (required):
Below is what I am trying to achieve. The CASE statement works fine but as soon as I added the IFNULL statement I got an SQL error message.
Any help with this is much appreciated.
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):
IFNULL("Compensation - Salary History Details Real Time"."Salary History"."Annualized Salary" ,'Not Reported')
CASE WHEN "Compensation - Salary History Details Real Time"."Salary History"."Annualized Salary" < =20000 THEN 'Up to £20,000' WHEN "Compensation - Salary History Details Real Time"."Salary History"."Annualized Salary" BETWEEN 20001 AND 30000 THEN '£20,001 - £30,000' WHEN "Compensation - Salary History Details Real Time"."Salary History"."Annualized Salary" BETWEEN 30001 AND 40000 THEN '£30,001 - £40,000' WHEN "Compensation - Salary History Details Real Time"."Salary History"."Annualized Salary" BETWEEN 40001 AND 50000 THEN '£40,001 - £50,000' WHEN "Compensation - Salary History Details Real Time"."Salary History"."Annualized Salary" BETWEEN 50001 AND 60000 THEN '£50,001 - £60,000' WHEN "Compensation - Salary History Details Real Time"."Salary History"."Annualized Salary" BETWEEN 60001 AND 70000 THEN '£60,001 - £70,000' WHEN "Compensation - Salary History