G
GoCoogs
I am building a database program that is tracking the results of
various activities from employees in different departments. The sticky
point is that all departments are not required to complete each
activity.
I have a staff table which is a list of staff members which includes a
reference to the department table which is a list of all departments.
I also have an activity table that contains the information for that
activity. I thought of adding a DeptReq field which would be a list of
the departments for which the activity was mandatory. This way when I
do a query for all those in the organization who were supposed to
complete the activity but haven't, I won't include those who were not
required to complete the activity. The only way I could think to do
this was comma separated list. This seems a bit clunky and I not
looking forward to coding the logic. Does anyone have better
suggestions?
Staff (StaffID; Name; Dept)
22, Jim; 2
23, Maggie; 3
24, Joseph; 1
Department (DeptID; DeptName)
1; Accounting
2; Operations
3; Shipping
Activitiy (ActID; ActivitName; DeptReq)
1; Safety Training; 2,3
2; Company Inservice; 2,3
3; Industry Conference; 1,2
Results (StaffID, Activity ID, Result)
22; 1; Pass
22; 3; Pass
23; 2; Pass
Now I would want to run a query that would return a list of those
responsible for the company inservice who did not complete it. I would
not want to include Joseph who was not responsible for attending but
would want to see Jim who was but does not have a result in the
Results table.
Thanks for your help.
various activities from employees in different departments. The sticky
point is that all departments are not required to complete each
activity.
I have a staff table which is a list of staff members which includes a
reference to the department table which is a list of all departments.
I also have an activity table that contains the information for that
activity. I thought of adding a DeptReq field which would be a list of
the departments for which the activity was mandatory. This way when I
do a query for all those in the organization who were supposed to
complete the activity but haven't, I won't include those who were not
required to complete the activity. The only way I could think to do
this was comma separated list. This seems a bit clunky and I not
looking forward to coding the logic. Does anyone have better
suggestions?
Staff (StaffID; Name; Dept)
22, Jim; 2
23, Maggie; 3
24, Joseph; 1
Department (DeptID; DeptName)
1; Accounting
2; Operations
3; Shipping
Activitiy (ActID; ActivitName; DeptReq)
1; Safety Training; 2,3
2; Company Inservice; 2,3
3; Industry Conference; 1,2
Results (StaffID, Activity ID, Result)
22; 1; Pass
22; 3; Pass
23; 2; Pass
Now I would want to run a query that would return a list of those
responsible for the company inservice who did not complete it. I would
not want to include Joseph who was not responsible for attending but
would want to see Jim who was but does not have a result in the
Results table.
Thanks for your help.