S
Simon
I have 2 tables:
Name Code
Red 1
Red 2
Red 3
Blue 1
Blue 2
Blue 3
Green 4
Green 5
Green 6
Group Code
1 1
1 2
2 3
2 5
3 3
3 4
3 6
Now I want to compare Group 1 and Group 2 and return any Names that match,
so fully normalised it would be as follows:
1 and 3 or 1 and 5 or 2 and 3 or 2 and 5
I would expect the following results:
Group 1 and Group 2: Red, Blue
Group 1 and Group 3: Red, Blue
Group 2 and Group 3: Green
Ideally I would like to also show which code matched within the results, but
I think this is too complicated:
Compare 1:
Red: 1 and 3, 2 and 3
Blue: 1 and 3, 2 and 3
Compare 2:
Red: 1 and 3, 2 and 3
Blue: 1 and 3, 2 and 3
Compare 3:
Green: 4 and 5, 5 and 6
Do I require a 3rd table to list of the comparisons I wish to make?
If so, how would I code/query all this information to get the results?
Thanks,
Simon
Name Code
Red 1
Red 2
Red 3
Blue 1
Blue 2
Blue 3
Green 4
Green 5
Green 6
Group Code
1 1
1 2
2 3
2 5
3 3
3 4
3 6
Now I want to compare Group 1 and Group 2 and return any Names that match,
so fully normalised it would be as follows:
1 and 3 or 1 and 5 or 2 and 3 or 2 and 5
I would expect the following results:
Group 1 and Group 2: Red, Blue
Group 1 and Group 3: Red, Blue
Group 2 and Group 3: Green
Ideally I would like to also show which code matched within the results, but
I think this is too complicated:
Compare 1:
Red: 1 and 3, 2 and 3
Blue: 1 and 3, 2 and 3
Compare 2:
Red: 1 and 3, 2 and 3
Blue: 1 and 3, 2 and 3
Compare 3:
Green: 4 and 5, 5 and 6
Do I require a 3rd table to list of the comparisons I wish to make?
If so, how would I code/query all this information to get the results?
Thanks,
Simon