S
Silvio
I need help in writing this statement: In short I have 2 tables with the
following relation - (Address) one-to-may (holds) – Desired outcome: Include
only records from tblAddress where **all** the related hold in tblHolds in
field DispoID is not null. A typical address has 1-5 hold so if any the olds
is still open (DispoID is null) then that address is excluded from the query.
Obviously what I have done is not working.
SELECT tblAddress.AddressID, tblAddress.AssignedToID, tblHolds.DispoID
FROM tblAddress LEFT JOIN tblHolds ON tblAddress.AddressID =
tblHolds.AddressID
GROUP BY tblAddress.AddressID, tblAddress.AssignedToID, tblHolds.DispoID
HAVING (((tblAddress.AssignedToID) Is Null) AND ((tblHolds.DispoID) Is Not
Null));
Thanks folks.
following relation - (Address) one-to-may (holds) – Desired outcome: Include
only records from tblAddress where **all** the related hold in tblHolds in
field DispoID is not null. A typical address has 1-5 hold so if any the olds
is still open (DispoID is null) then that address is excluded from the query.
Obviously what I have done is not working.
SELECT tblAddress.AddressID, tblAddress.AssignedToID, tblHolds.DispoID
FROM tblAddress LEFT JOIN tblHolds ON tblAddress.AddressID =
tblHolds.AddressID
GROUP BY tblAddress.AddressID, tblAddress.AssignedToID, tblHolds.DispoID
HAVING (((tblAddress.AssignedToID) Is Null) AND ((tblHolds.DispoID) Is Not
Null));
Thanks folks.