COMPARING TWO fields of two tables

P

Pheobius

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
 
P

pietlinden

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)
 
P

pietlinden

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)
 
Top