G
Guest
Here's my setup:
tblEquipment:
pkEquipmentID
EquipmentName
Description
tblEmployees:
pkEmployeeID
EmployeeFirstName
EmployeeLastName
tblHireDetails:
pkTransactionID
fkEquipmentID
fkEmployeedID
HireDate
ReturnDate
I would like a query that selects EquipmentID's for all EquipmentID's in
tblEquipment that aren't in tblHireDetails. I would like to extend that query
to also include EquipmentID's from tblEquipment that are in tblHireDetails
but ReturnDate is not null. An EquipmentID can be in tblHireDetails more than
once but it can only appear in one record with a null ReturnDate field.
The query should only include a single EquipmentID.
The basic intention is to query for available equipment. Equipment is only
available when it is not in tblHireDetails or it is in tblHireDetails but
every instance has a ReturnDate.
Any help is appreciated.
Thanks
Dave
tblEquipment:
pkEquipmentID
EquipmentName
Description
tblEmployees:
pkEmployeeID
EmployeeFirstName
EmployeeLastName
tblHireDetails:
pkTransactionID
fkEquipmentID
fkEmployeedID
HireDate
ReturnDate
I would like a query that selects EquipmentID's for all EquipmentID's in
tblEquipment that aren't in tblHireDetails. I would like to extend that query
to also include EquipmentID's from tblEquipment that are in tblHireDetails
but ReturnDate is not null. An EquipmentID can be in tblHireDetails more than
once but it can only appear in one record with a null ReturnDate field.
The query should only include a single EquipmentID.
The basic intention is to query for available equipment. Equipment is only
available when it is not in tblHireDetails or it is in tblHireDetails but
every instance has a ReturnDate.
Any help is appreciated.
Thanks
Dave