Joining Two Tables / Queries

G

Guest

Join will be based on a match to three data fields: product code, serial
number, tracking code. Table 1, product line; table 2, shipping data.

Example of Table 1:
product code: 12345
serial number: 78936
track code: 567

There are 2000 records on the product table and 1000 ship records. I would
like the results of the query to output those ship docs that match to the
prodct table.

Note: The shipping data table can have the same product code as table 1 but
with different serial and tracking codes.

Thanks!
 
G

Guest

If you only have one field in common, you'll need to use it as the join
between the tables. Depending on the data, this could cause unwanted records.

SELECT [Table 1].*, [Table 2].*
FROM [Table 1] INNER JOIN [Table 2]
ON [Table 1].[product code] = [Table 2].[product code]
ORDER BY [Table 1].[product code] ;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top