Conditional Querying of one option among two options Within sql
Dear collegues,
Is there any possibility to implement in one declarative sql select something like conditional query.
So that based on some condition one of two or many SQLs is executed and this is packaged on one SQL...but only one not both of them and
then making restriction on return resultset - afraid of perfomances issues.
Something like this ( just illustrating the idea ...sql is not ok ):
Select X.c1, X.c2, X.c3
from
( Case condition
when '1'
Select A1 C1, A2 C2, A3 C3
From T1
Where ....;
when '2'
Select B1 C1, B2 C2, B3 C3
0