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!

How to use an IN condition while using an OUTER JOIN

userLynxJun 1 2011 — edited Jun 7 2011
I have an exisiting Stored Procedure that uses an outer join but I have to modify this query to only return for certain statuses. I cannot use an IN clause with an outer join and I was wondering if this would still work:

select a.account_number, s.refresh_dt,
max(m.exp_dt)
from acct a,
marketer_account m,
account_service s
where a.full_account_number = '4823250009'
and a.account_number = m.account_number (+)
and a.account_number = s.account_number (+)
and s.service_type (+) = 'E'
and m.status_id in (2,3,4)
group by a.account_number, b.refresh_dt;

[I added the line in bold: and m.status_id in (2,3,4) ]

Thanks
Sean
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2011
Added on Jun 1 2011
15 comments
602 views