hello to all
tbl_Ref holds thousands of records organized into Sets of 8 records, each having Position 1 to 8.
tbl_Test holds just 1 Set of 8 records. My task is find any matches between the 8 records in tbl_Test and the Sets in tbl_Ref.
*** Here's the problem. The thing that must be matched is NOT the values of DVal, but a PATTERN formed by these values...
In tbl_Test, we notice that some of the values of DVal form DOUBLETS (Posit 1 & 4, and Posit 3 & 8), some form a TRIPLET (Posit 2, 6 & 7), and there is also a Singleton (Posit 5). I need help adding a PATTERN column to tbl_Test and to tbl_Ref like the table below. D1 means 1st Doublet, D2 means 2nd Doublet, etc...
Once the PATTERN column is added, it will be easy to find matches between the 2 tables. In the example shown above, tbl_Test matches Set 2 in tbl_Ref. Set 1 comes close to a match, but the Doublets are in the wrong order.
I just can't figure out how to generate values for this PATTERN columns of both tables. Thank you in advance for any help.
Vicky C.
tbl_Ref holds thousands of records organized into Sets of 8 records, each having Position 1 to 8.
tbl_Test holds just 1 Set of 8 records. My task is find any matches between the 8 records in tbl_Test and the Sets in tbl_Ref.
Code:
[b]
tbl_Ref tbl_Test
Set Posit DVal Posit DVal [/b]
1 1 99 1 82
1 2 11 2 44
1 3 99 3 60
1 4 75 4 82
1 5 55 5 51
1 6 11 6 44
1 7 11 7 44
1 8 75 8 60
2 1 37
2 2 16
2 3 18
2 4 37
2 5 13
2 6 16
2 7 16
2 8 18
3 1 etc....
*** Here's the problem. The thing that must be matched is NOT the values of DVal, but a PATTERN formed by these values...
In tbl_Test, we notice that some of the values of DVal form DOUBLETS (Posit 1 & 4, and Posit 3 & 8), some form a TRIPLET (Posit 2, 6 & 7), and there is also a Singleton (Posit 5). I need help adding a PATTERN column to tbl_Test and to tbl_Ref like the table below. D1 means 1st Doublet, D2 means 2nd Doublet, etc...
Code:
[b]
tbl_Test
Posit DVal PATTERN [/b]
1 82 D1
2 44 T1
3 60 D2
4 82 D1
5 51 S1
6 44 T1
7 44 T1
8 60 D2
Once the PATTERN column is added, it will be easy to find matches between the 2 tables. In the example shown above, tbl_Test matches Set 2 in tbl_Ref. Set 1 comes close to a match, but the Doublets are in the wrong order.
I just can't figure out how to generate values for this PATTERN columns of both tables. Thank you in advance for any help.
Vicky C.