Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

select inside coalesce

737598Nov 27 2009 — edited Nov 27 2009
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2009
Added on Nov 27 2009
4 comments
1,522 views