Link to home
Start Free TrialLog in
Avatar of g118481
g118481

asked on

Need an example of a query of how to pull record data from three tables?

Hi,

I need to write a query that pulls information from three different tables, and joins the information from the three tables into one record.

Each table has one field in common with the others.  
That field is RequestID.
From table A I need to pull RequestID, LoadedLOE.
From table B I need to pull RequestID, ReleaseMonth, ReleaseYear.
From table C I need to pull RequestID, Subline.

The query needs to combine these records into my table D.

Thanks in advance for your time.
ASKER CERTIFIED SOLUTION
Avatar of bwasyliuk
bwasyliuk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
and yet another variation (just for fun):

select requestid,releasemonth,releaseyear,subline
into table4
from
  table1 inner join table2 using(requestid)
  inner join table3 using(requestid)