I want to run below statement but it is giving me the below error
select
case SEA.CONTENT_RESPONSE_STATE_ID
when null then C.DISPLAY_NAME
when 58 then 'Task Submission'
when 59 then 'Sender Approved'
end AS ACTION
from table sea join table1 c
I am getting following error
ERROR: operator is not unique: numeric = boolean
Hint: Could not choose a best candidate operator. You might need to add explicit type casts.
I am not getting where I need to add cast and why?
I tried adding cast as below
when CONTENT_RESPONSE_STATE_ID is null::numeric then C.DISPLAY_NAME
but the result is not correct in case of null although C.DISPLAY_NAME is not null but action is still getting populated as NULL