Serach - Return

icemac

Registered User.
Local time
Today, 15:38
Joined
Jul 17, 2006
Messages
31
I am creating a database for a hyperthetical car hire company. I have created three tables, customer table, car table and bookng table. The customer table is linked to the booking table using a Customer ID (autonumber). The car table is linked to the booking table using NumberPlate. The primary key for the booking table is Booking ID.

The cars are catagorised in different groups e.g. hatchback, sports car etc. The customer will choose a car type which is entered into the booking table. They will also enter the dates for which they want to hire their car.

I want my database to take these dates and the type of car, search through the car table and return a list of cars of that type which are availiable on these dates.

Can this be done???
 
yes, the hard part is doing the dates bit.

i presume your booking table will have a booked from and booked to, and you will have a prospective booking from and to.

you want to find all the bookings that finish after your start-new-hire date, or that start before your finish-new-hire date. This gives you a list of cars you cant use.

if you then do a find unmatched between the cars table and this query you will have the cars you can use.
 

Users who are viewing this thread

Back
Top Bottom