Answer the question
In order to leave comments, you need to log in
How to combine "in" and "case"?
I can write such a predicate in where
select *
from customer
inner join documents on documents.customer_id = customer_id
where customer.type = case ... end
select *
from customer
inner join documents on documents.customer_id = customer_id
where documents.id in case when customer.type = 'A' then (1,2,3) when customer.type = 'B' then (3,5,6) end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question