Hi Fjordur,
What you need to do here is to figure how many skills are required for each
mission, and then how many of those skills each person has. So, to start:
Mission_Skill_Count (totals the number of skills required for each mission):
SELECT Mission_Skills.missionID, Count(Mission_Skills.skillID) AS Skill_Count
FROM Mission_Skills
GROUP BY Mission_Skills.missionID;
Mission_Persons_SomeSkills (counts how many skills for each mission that each
person has):
SELECT Mission_Skills.missionID, Person_Skills.personID, Count(Person_Skills.
personID) AS Skill_Count
FROM Mission_Skills INNER JOIN Person_Skills ON Mission_Skills.skillID =
Person_Skills.skillID
GROUP BY Mission_Skills.missionID, Person_Skills.personID;
Mission_Persons_AllSkills (from thosse people woth some of the skills,
figures out how many of them have all of the skills required by comparing
each person's skill count with the skill count for the mission overall):
SELECT Mission_Skill_Count.missionID, Mission_Skill_Count.Skill_Count AS
SkillsRequired, Mission_Persons_SomeSkills.personID
FROM Mission_Skill_Count INNER JOIN Mission_Persons_SomeSkills ON
Mission_Skill_Count.missionID = Mission_Persons_SomeSkills.missionID
WHERE (((Mission_Persons_SomeSkills.Skill_Count)>=[Mission_Skill_Count].
[Skill_Count]));
Fjordur - 25 Nov 2005 10:36 GMT
Hi, David,
> What you need to do here is to figure how many skills are required for each
> mission, and then how many of those skills each person has. So, to start:
> (... 3 queries)
Wow!!
I'll have to meditate on those queries you wrote. They work just fine, and
I've incorporated them in my application..
Thanks a lot, really!
--
Fjordur