select inside coalesce
737598Nov 27 2009 — edited Nov 27 2009Hi,
Just wondering if it's possible to have a subquery as one of the arguments for coalesce.
The stored procedure I'm trying to write would look something like...
open rc for
select l.data1 as ld1, l.data2 as ld2, b.data1 as bd1, b.data2 as bd2, c.data1 as as c_d1, c.data2 as cd2
from tablel l, tableb b, tablec c
where blahblahblah
and c.data1 = coalesce(b.data4, (select d.data4 from tabled d where d.data3 = b.data3))
I get this error when i try though.
ORA-01799: a column may not be outer-joined to a subquery