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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

more than one column equi-join, how??

Status
Not open for further replies.

hengsin

Technical User
Mar 26, 2003
128
0
0
MY
tblPart = Part_Num,Business_Unit_Id

tblOrderDetail = Part_num,Business_Unit_Id

tblCorp = Business_Unit_Id

I have three tables as stated above. I want to equi-join tblPart.Part_Num = tblOrderDetail.Part_Num and tblPart.Business_Unit_Id = tblOrderDetail.Business_UnitId and tblOrderDetail.Business_Unit_id = tblCorp.Business_Unit_id

I don;t know how to contruct this kind of join in SQL for Oracle 7. I'm using SQL Plus 3.3.

If there is only one-column join but i'm having difficult to contruct for more than one column.

Thanks
 
You may explicitly specify as many join conditions as you need. Oracle 7 doesn't support JOIN syntax, so you should write them in WHERE clause:

select * from tblPart
,tblOrderDetail
,tblCorp
where tblPart.Part_Num = tblOrderDetail.Part_Num and tblPart.Business_Unit_Id = tblOrderDetail.Business_UnitId and tblOrderDetail.Business_Unit_id = tblCorp.Business_Unit_id


Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top