Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jwhelan
Starting Member
7 Posts |
Posted - 2001-12-10 : 08:19:46
|
| I have the following tables:JobPosting--------------ID int (Identity)PositionTitle varchar(100)PositionDate varchar(100)----------------------------------JobPostingSkills--------------------ID int (Identity)SkillID int (Related to JobSkills.ID)JobID int (Related to JobPosting.ID)--------------------------------------------JobMembers--------------ID intFirstName varchar(100)LastName varchar(100)------------------------JobMembersSkills-----------------ID int (Identity)SkillID int (Related to JobSkills.ID)MemberID int (Related to JobMembers.ID)---------------------------JobSkills----------ID int (Identity)SkillName varchar(100)---------------------------I need to create a Stored Procedure.The procedure will look take a JobPosting, and return the JobMembers that have any of the skills from JobMembersSkills in the JobPostingSkills.Can someone please give me some guidence on how to start this. I am only used to simple sql, and this seems over my head...If any more information is needed about my table structures or what I need returned please reply to this post.ThanksJason |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2001-12-10 : 08:57:16
|
SELECT MemberIDFROM JobMembersSkillsWHERE SkillID IN ( SELECT SkillID FROM JobPostingSkills WHERE JobID = @JobPosting)GROUP BY MemberID |
 |
|
|
jwhelan
Starting Member
7 Posts |
Posted - 2001-12-10 : 10:41:52
|
Thank you so much for your prompt response. It works exactly as I was asking.Jasonquote:
SELECT MemberIDFROM JobMembersSkillsWHERE SkillID IN ( SELECT SkillID FROM JobPostingSkills WHERE JobID = @JobPosting)GROUP BY MemberID
|
 |
|
|
|
|
|