COMPARING TWO fields of two tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tables one with FACTORY and the other with INSPECTOR information I
need to build a query that will show me all the factory records and if the
FACTORY record is not available a particular landing then the INSPECTOR
information should be shown. The trip ID numbers are common in either tables
 
Pheobius said:
I have two tables one with FACTORY and the other with INSPECTOR information I
need to build a query that will show me all the factory records and if the
FACTORY record is not available a particular landing then the INSPECTOR
information should be shown. The trip ID numbers are common in either tables

Sounds like you need to use an outer join.

Instead of

SELECT F.SomeField, I.OtherField
FROM Factory AS F INNER JOIN Inspector AS I ON F.FActoryID=I.FactoryID
....

just change the inner join to outer join.

double click the line between the two tables in the QBE grid, and
choose the appropriate option. (either 2 or 3)
 
Pheobius said:
I have two tables one with FACTORY and the other with INSPECTOR information I
need to build a query that will show me all the factory records and if the
FACTORY record is not available a particular landing then the INSPECTOR
information should be shown. The trip ID numbers are common in either tables

Sounds like you need to use an outer join.

Instead of

SELECT F.SomeField, I.OtherField
FROM Factory AS F INNER JOIN Inspector AS I ON F.FActoryID=I.FactoryID
....

just change the inner join to outer join.

double click the line between the two tables in the QBE grid, and
choose the appropriate option. (either 2 or 3)
 

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

Back
Top