kampfcoder
Programmer
I have a nasty problem, where I need to match all the values belonging to an object, with all the values belonging to another object.
Both object values point to the same table.
Only if ALL values match, will there be a hit.
I have written an example below to clarify the problem. The table structure is identical to my problem's. I have only written field names, that are of interest to the problem.
Thanx in advance!
|
|
Tables:
++++++++++++++++++++++++++++
Profile
-------
profileid
profileeducation
----------------
profileid
educationid
++++++++++++++++++++++++++++
++++++++++++++++++++++++++++
candidate
---------
candidateid
candidateeducation
------------------
candidateid
educationid
++++++++++++++++++++++++++++
Example.
Two dataset:
Profile1 Candidate1
education1 education1
education2 education2
education3 education3
Only if all the profile's educations matches all the candidate's educations, will it return the candidate, and only ONE candidate
If the candidate has two educations, there will be no match. If the candidate has more educations than the profile, but 3 of them matches the profile, there will also be a match
Both object values point to the same table.
Only if ALL values match, will there be a hit.
I have written an example below to clarify the problem. The table structure is identical to my problem's. I have only written field names, that are of interest to the problem.
Thanx in advance!
|
|
Tables:
++++++++++++++++++++++++++++
Profile
-------
profileid
profileeducation
----------------
profileid
educationid
++++++++++++++++++++++++++++
++++++++++++++++++++++++++++
candidate
---------
candidateid
candidateeducation
------------------
candidateid
educationid
++++++++++++++++++++++++++++
Example.
Two dataset:
Profile1 Candidate1
education1 education1
education2 education2
education3 education3
Only if all the profile's educations matches all the candidate's educations, will it return the candidate, and only ONE candidate
If the candidate has two educations, there will be no match. If the candidate has more educations than the profile, but 3 of them matches the profile, there will also be a match