Need help with a query for finding matching records (1 Viewer)

carvind

Registered User.
Local time
Today, 05:44
Joined
Nov 10, 2000
Messages
22
I have two tables Table 1 and Table 2. Table 1 has 6 fields 175 records and Table 2 has 4 fields and 330 records. The first three fields in both the tables are the same. I need to find all records in the first table that have a matching record in the second table based on those first three fields. How can I accomplish this? Any help would be greatly appreciated.

Thanks
 

mresann

Registered User.
Local time
Yesterday, 21:44
Joined
Jan 11, 2005
Messages
357
Code:
SELECT Table1.T1Field1, Table1.T1Field2, Table1.T1Field3
FROM Table1, Table2
WHERE (((Table1.T1Field1)=[Table2].[T2Field1]) 
AND ((Table1.T1Field2)=[Table2].[T2Field2]) 
AND ((Table1.T1Field3)=[Table2].[T2Field3]));

Notice there are no joins in the FROM clause.
 

churchill

Registered User.
Local time
Yesterday, 21:44
Joined
Aug 5, 2005
Messages
18
Same Task as you

Hi,

Im trying to do the same kind of thing as you, and i cant get mine to work. When you get yours to work could you help me with mine.
Noone has replied to my post either.

Hope you get it sorted.

Email me on kelly.churchill@btlocalbusiness.co.uk

thanks
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 00:44
Joined
Feb 19, 2002
Messages
43,522
Use the QBE to build the query. Add the two tables to the grid. Draw the join lines between the two tables, one for each field if you are joining on multiple fields. Then select whatever columns you want from each table.
 

Users who are viewing this thread

Top Bottom