
Originally Posted by
MrDummy
Dear Knarfreppep,
I will try your way if this would work.
For Ajax,
I have made a sample database. Attached. Query4 is where it is all combined. here you see the following duplicate records:
For nr 23:
1817 away from 1395 and 1395 away from 1817
1794 away from 1395 and 1395 away from 1794
For nr 24
1395 away from 1794 and 1794 away from 1395
These are considered as "duplicates" and should be taken out in such a way that only one of them is left. It doesn't matter which one of the two.
Maybe better to look at the above first.
You may also see another issue coming up: 1395 separated from 1794 and 1395 away from 1794. The first one has a higher risk level (Sepaarted) then the second one (Away from). The second one must also be be taken out so only the higher risk items remain. The table SegTerms gives the risklevels (1 to 4). So in the end the Query4 should look like:
Nr23:
0104 separated by 1395
0104 spearted by 1794
0104 separeted by 1817
1395 separated from 1794
1395 separarated from 1817
Nr 24
1395 separated from 1794