FROM clauses are not allowed in expressions in PSQuery
Hi,
I have a query with 2 sqls .
My requirement is if the 1st sql reurns rows then query should not include the values from bottom union.
Currently I am trying with 2 sqls with case starement. This is working fine in the back end (Oracle).
When I am trying in PS query with expression I am getting the below error.
Sample SQL:
select case when COUNTER > 0 then oprid
else (select oprid from sysadm.PS_TABLE2 WHERE COUNTER > 0 and emplid = '123455' )
end
from sysadm.PS_TABLE2
WHERE emplid = '123455'
Error: FROM clauses are not allowed in expressions in PSQuery
If the top sql returns values then query should have values from Top sql only.