Here are the tables;
tbl_people
- pkey - primary key
- dept - varchar
- name - varchar
etc...
tbl_jobs
- jkey - primary key
- desc - varchar (job titles)
tbl_job_link
- lkey - primary key
- ljkey - foreign key (ties with tbl_jobs.jkey)
- lpkey -foreign key (ties with tbl_people.pkey)
Challenge;
I would like to know every job that is not assigned to a person for a given dept.
i.e. if no-one in the maintenance dept is assigned to the job of teaching I want it to print the job and dept.
Sounds like a join query to me but I can't quite get it to work.
Can anyone help?
____________________________
JustKIDn
____________________________
Families can be together forever...
tbl_people
- pkey - primary key
- dept - varchar
- name - varchar
etc...
tbl_jobs
- jkey - primary key
- desc - varchar (job titles)
tbl_job_link
- lkey - primary key
- ljkey - foreign key (ties with tbl_jobs.jkey)
- lpkey -foreign key (ties with tbl_people.pkey)
Challenge;
I would like to know every job that is not assigned to a person for a given dept.
i.e. if no-one in the maintenance dept is assigned to the job of teaching I want it to print the job and dept.
Sounds like a join query to me but I can't quite get it to work.
Can anyone help?
____________________________
JustKIDn
____________________________
Families can be together forever...