I have a select with a multiple subselects.
I would like to do a case statement where I compare string to sting. For example from ireport I get as a parameter a schema of database. In case of one schema take one select in case of another take another select
select
(select a from b) as one,
(select case "msp." = "msp" THEN select bla bla bal
else select bla bla) as two
postgres doesn't support this I guess.
I tried to put all smth like
select
(select a from b) as one,
(select case par = "msp" THEN select bla bla bal
else select bla bla) as two
from
(select "msp." as par)
but (select "msp." as par ) doesn't work as well. Like SELECT 1+2 as result does. I tried do do smth similar. any suggestions??
thank you