Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Join Help

Status
Not open for further replies.

pheffley

MIS
Jun 2, 2003
38
US
I have three tables that I am trying to join:
Plan
Oper
Master_PDN
The Plan & Oper tables are joined by Plan#; the Oper & Master_PDN are joined by PDN:

Code:
Select a.RCC
From Plan a
where Plan# in (select b.Plan#
                from oper b, Master_PDN c
                where b.PDN = c.PDN);

Would this do the trick (I'm not at my workstation)

Code:
select c.PDN, a.RCC
from plan a, oper b, Master_PDN c
where a.plan = b.plan
and b.pdn = c.pdn;

I need to output the PDN with the Plan.RCC...how can this be done? Also, if you have any suggestions on a more efficient query, please advise.

Thanks,

Paul

 
Looks fine.


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top