select * from table where columnType in( case when TRUE then (1,2) end );
This query is giving syntax error Invalid argument types for function 'IFF': (BOOLEAN, ROW(NUMBER(1,0), NUMBER(1,0)), NULL)
.
It is working fine if I am using a single integer to return in then statement i.e
select * from table where columnType in( case when TRUE then (1) end );
How can I return a list of integers in a case statement?
2
Answers
Check for the "CASE" condition first and then the "IN" condition.
This is an other option to do it using
REGEXP
:Demo here