One to many

Mike Hughes

Registered User.
Local time
Today, 13:00
Joined
Mar 23, 2002
Messages
493
I have two tables. Each table has a primay key which is "member number" in each table.

Say table 1 has 250 records and table 2 has 100

I want all the records from table 1 and the 100 records from table 2 which are matched on "member number" So I would end up with table 3 which contains 250 records some of which contain data from table 2.

I thouht a one to many relationship would give me all the records from table 1 and the records from table 2 matched on "member number" but when I run the query I only get records where table 1 and table 2 "member number" matches.

Can someone tell me what I'm doing wrong here?
 
What you need is called an OUTER JOIN. Put both tables into the query by example grid and then join the primary key of the first table with the foreign key in the second and then double click on the link joining them and select the one option (probably the second one in the list) which states "select all records from table 1 and only those records in table 2 that match."
 
I got it, thanks MIke
 

Users who are viewing this thread

Back
Top Bottom