View Full Version : help with comparing 2 tables in a query, and getting unmatched values


stooopid
09-21-2002, 04:20 AM
Hey guys,
i know this is a noob question, databases are not my forte

i'm using access2002, if i had two tables, one describing the car engines in stock and another the engines replaced in customers cars, the engine field type is alphanumerical and the tables are joined by an engine number field. how do i find out the engine numbers of all engines that have not been used by customers? ie. if engine types for argument sake were types A1 through A10, and customers had used two A2's two A6's and an A9, how do i make a query give the list of engine types not in the customers list?

Thanks in advance

DBL
09-21-2002, 06:12 AM
Open the query in design view and double-click the linking line between the two tables. Select the option that says Include All records for main table and only those records in the second table where there is a match. Drag the linking field from the second table into the query grid and put Is Null in the Criteria row for that column. That should show you any engine numbers that the customer hasn't used.

stooopid
09-22-2002, 07:33 AM
many thanks for your help, i ended up after hours of playing with it finding a wizard for unmatched values, which basically did just as you suggested :)

thanks