W
will206
Guest
I work in a logistics firm have been working on a database to keep track of the vehicles we use/defects/accidents etc. The nature of the business means that we often have to hire in trailers for weeks/months at a time and then get rid of them afterwards. It is this aspect of the database I am having trouble reporting on.
The trailer details table links to a seperate table that records "Trailer ID", "Date on hire" and "Date off hire". Eg. 1 record might be:
Trailer ID: TX700
Date on hire: 07/01/2006
Date off hire: 19/04/2006
Meaning that we have trailer TX700 on hire between 07/01/2006 and 19/04/2006.
From this data I need to be able to run two queries. One where the user can enter a single date and it will return all of the trailers on hire for that particular date and one where the user can enter a date period and the database will return all trailers that were hired within that period and the dates we hired them from and to.
Any help with this problem is very much apreciated and I can give you more info/explanation if required.
The trailer details table links to a seperate table that records "Trailer ID", "Date on hire" and "Date off hire". Eg. 1 record might be:
Trailer ID: TX700
Date on hire: 07/01/2006
Date off hire: 19/04/2006
Meaning that we have trailer TX700 on hire between 07/01/2006 and 19/04/2006.
From this data I need to be able to run two queries. One where the user can enter a single date and it will return all of the trailers on hire for that particular date and one where the user can enter a date period and the database will return all trailers that were hired within that period and the dates we hired them from and to.
Any help with this problem is very much apreciated and I can give you more info/explanation if required.