lithium1976
Registered User.
- Local time
- Today, 03:16
- Joined
- May 28, 2010
- Messages
- 12
Hello,
I was just wondering if the following two queries can be re-written into one single query or is this not do-able?
They are based off a many-to-many relationship between tblPeople and tblJobs with a link table called tblLinkPeoplesJobs in the middle.
I am pretty much an SQL novice, so am asking purely out of interest.
Thank you
and
I was just wondering if the following two queries can be re-written into one single query or is this not do-able?
They are based off a many-to-many relationship between tblPeople and tblJobs with a link table called tblLinkPeoplesJobs in the middle.
I am pretty much an SQL novice, so am asking purely out of interest.
Thank you
SQL:
SELECT tblPeople.peopleID, tblPeople.peopleFirstName, tblPeople.peopleSurname, tblLinkPeoplesJobs.jobID
FROM tblPeopleINNER JOIN tblLinkPeoplesJobsON tblPeople.peopleID= tblLinkPeoplesJobs.peopleID
WHERE (((tblLinkPeoplesJobs.jobID)=[forms]![frmSearch]![listPeople]));
SQL:
SELECT tblPeople.peopleID, Query1.jobID, tblPeople.peopleFirstName, tblPeople.peopleSurname
FROM Query1 RIGHT JOIN tblPeopleON Query1.peopleID= tblPeople.peopleID
WHERE (((Query1.jobID) Is Null));