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!

"Case Statement" outer join

741497Mar 30 2011 — edited Mar 30 2011
How to use outer join for case statement

select emp1.name
from emp1, emp2
where emp1.emp_id = emp2.emp_id(+)

Now adding case statement to it

select emp1.name
from emp1, emp2
where emp1.emp_id = (Case When emp1.dept=10 then emp2.emp_id
when emp1.dept= 20 then emp2.person_id
end)

how to use outer join in this case?
OR
Any alternate solution

Edited by: AppsRD on Mar 30, 2011 6:29 AM

Edited by: AppsRD on Mar 30, 2011 6:30 AM

Edited by: AppsRD on Mar 30, 2011 6:35 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 27 2011
Added on Mar 30 2011
7 comments
16,192 views