Query problem

icemac

Registered User.
Local time
Yesterday, 19:00
Joined
Jul 17, 2006
Messages
31
I am creating a database for a hyperthetical car hire company. There is a car table, a booking table and a customer table. When a customer books a car the cutomer ID is taken and the number plate of the car is taken.

I have generated 2 lists. The first contains all of the numberplates stored in the car table. The second contains all of the cars that can not be used, because they have already been booked by another customer. I want to create a query that subtracts the 2nd list from the 1st list to create a list of cars that can be used. How would i do this??

I am using Access 2003

Iain
 
Select * from {the first table}
Where {some field name}
Not In
(Select {other field name}
From {the second table});
 

Users who are viewing this thread

Back
Top Bottom