JHMarshIII
Registered User.
- Local time
- Today, 07:10
- Joined
- Feb 8, 2002
- Messages
- 19
Sorry all, I am barely a newbie programmer, I need help with structuring a complex query to drive an exception report.
Relationships and Background:
-----------------------------
I have four tables,
Buildings
Member-Volunteer
Jobs-Willing-To-Do
Job-Roles
Key related fields:
BuildingID
MemberID
JobID
Member-Volunteer is the main table that has a Building ID for each member that is related to a table of 100 Building addresses (Buildings) . This was to prevent redundant saving of the building addresses. This table is also related to the Jobs-Willing-To-Do table by MemberID. There is a further relationship of table Jobs-Willing-To-Do to the table Job-Roles (with fields, JobID and Job Description. So table Jobs-Willing-ToDo has only the field JobID and all the info like Job-Start-DT and Job-End-Date, but no Job Name, which is retrieved from Job-Roles by field JobID.
What I Need:
------------
1) From the perspective of the table Buildings I need to create a report of all 100 buildings that have Member-Volunteers that are found in Jobs-Willing-ToDo with a JobID of x, y, or Z and have a Job-Start-Dt that is Not Null. I need to also print not just the JobID code but the JobDescription as well which is in the look up table Job-Role.
2) Then I also need to create an exception report that isolates all the Buildings that don't have Member-Volunteers willing to serve a particular role (or) JobID (JobDesc). Or I guess NE to x, y, or z.
Is this done by using an nested SQL statement? Can someone lead me in the right direction?
Many thanks, John ...
---------------------------
Thanks UK for Your Support in The Gulf!
May All of our Soldiers Return Safely!
Relationships and Background:
-----------------------------
I have four tables,
Buildings
Member-Volunteer
Jobs-Willing-To-Do
Job-Roles
Key related fields:
BuildingID
MemberID
JobID
Member-Volunteer is the main table that has a Building ID for each member that is related to a table of 100 Building addresses (Buildings) . This was to prevent redundant saving of the building addresses. This table is also related to the Jobs-Willing-To-Do table by MemberID. There is a further relationship of table Jobs-Willing-To-Do to the table Job-Roles (with fields, JobID and Job Description. So table Jobs-Willing-ToDo has only the field JobID and all the info like Job-Start-DT and Job-End-Date, but no Job Name, which is retrieved from Job-Roles by field JobID.
What I Need:
------------
1) From the perspective of the table Buildings I need to create a report of all 100 buildings that have Member-Volunteers that are found in Jobs-Willing-ToDo with a JobID of x, y, or Z and have a Job-Start-Dt that is Not Null. I need to also print not just the JobID code but the JobDescription as well which is in the look up table Job-Role.
2) Then I also need to create an exception report that isolates all the Buildings that don't have Member-Volunteers willing to serve a particular role (or) JobID (JobDesc). Or I guess NE to x, y, or z.
Is this done by using an nested SQL statement? Can someone lead me in the right direction?
Many thanks, John ...
---------------------------
Thanks UK for Your Support in The Gulf!
May All of our Soldiers Return Safely!
Last edited: