Answer the question
In order to leave comments, you need to log in
How to ignore results when using the case when construct?
I have a question how to return only those results that are doubled in the inner query
select case when
exists(select 1 from table1 where table1.field1=1373369)
then
( table2.field1)
else
(select case when (
select 1 from ..... here is a complex selection from several tables linked by table2.field2
)=1 then
table2.field1
end as id
)
end from table2 where table2.field2=282
if the result of the inner query does not double the condition of equality 1, then an empty result will be displayed, how can I make it so that the value of table2.field1 or nothing is displayed, and not empty?
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