I have 2 pages - one accepts all sorts of criteria from the user to search by, and the second has a sql statement which retrieves any records which match all criteria.
Here's the statement:
SELECT JobCategory.JobCatName, CareerLevel.CareerName, CandidateContactInfo.CandidateID, Locations.LocationName, SkillCategory.SkillName " _
& "FROM CandidateContactInfo, CandidateJobCategory, JobCategory, CareerLevel, Locations, CandidateLocations, SkillCategory, CandidateSkills " _
& "WHERE CandidateJobCategory.JobCatID = " & session("SearchJobCategory" _
& "AND CandidateJobCategory.JobCatID = JobCategory.JobCatID " _
& "AND CandidateContactInfo.CareerLevel = CareerLevel.CareerID " _
& "AND CandidateContactInfo.CareerLevel = " & session("SearchCareer" _
& "AND CandidateLocations.LocationID = " & session("SearchLocation" _
& "AND CandidateLocations.LocationID = Locations.LocationID " _
& "AND CandidateSkills.SkillID = SkillCategory.SkillID " _
& "AND CandidateSkills.SkillID IN (" & skills & "" _
& "AND CandidateContactInfo.CandidateID = CandidateJobCategory.CandidateID
This works fine. Then I display the results of the query in a grid. The problem is that I would like to allow multiple select in each of the categories. I already did it for skills, as you can (sort of) see. But when displayed in the grid, I get 2 entries, one for each selected skill.
What do I need to change in my statement, or in my grid display, to get it to show one line for each candidate with all the information about that candidate:
job categories, careers, locations, skills, candidateID
job categories, etc. next candidateID
instead of
job category, etc. candidateID
job category, etc. same candidateID
I think this sounds pretty complicated, but I hope someone can figure out what I want and point me in the right direction! Thanks!
Here's the statement:
SELECT JobCategory.JobCatName, CareerLevel.CareerName, CandidateContactInfo.CandidateID, Locations.LocationName, SkillCategory.SkillName " _
& "FROM CandidateContactInfo, CandidateJobCategory, JobCategory, CareerLevel, Locations, CandidateLocations, SkillCategory, CandidateSkills " _
& "WHERE CandidateJobCategory.JobCatID = " & session("SearchJobCategory" _
& "AND CandidateJobCategory.JobCatID = JobCategory.JobCatID " _
& "AND CandidateContactInfo.CareerLevel = CareerLevel.CareerID " _
& "AND CandidateContactInfo.CareerLevel = " & session("SearchCareer" _
& "AND CandidateLocations.LocationID = " & session("SearchLocation" _
& "AND CandidateLocations.LocationID = Locations.LocationID " _
& "AND CandidateSkills.SkillID = SkillCategory.SkillID " _
& "AND CandidateSkills.SkillID IN (" & skills & "" _
& "AND CandidateContactInfo.CandidateID = CandidateJobCategory.CandidateID
This works fine. Then I display the results of the query in a grid. The problem is that I would like to allow multiple select in each of the categories. I already did it for skills, as you can (sort of) see. But when displayed in the grid, I get 2 entries, one for each selected skill.
What do I need to change in my statement, or in my grid display, to get it to show one line for each candidate with all the information about that candidate:
job categories, careers, locations, skills, candidateID
job categories, etc. next candidateID
instead of
job category, etc. candidateID
job category, etc. same candidateID
I think this sounds pretty complicated, but I hope someone can figure out what I want and point me in the right direction! Thanks!