dynamictiger
Registered User.
- Local time
- Today, 01:21
- Joined
- Feb 3, 2002
- Messages
- 270
This issue is difficult to describe, so please bear with me.
I have attached a sample database below to have a look at.
There is a table tblData this contains numbers. I have reduced it for this post to a few records the original has several millions.
A second table tblVariable contains another set of numbers.
The task is to search for matches in tblData…sounds simple enough. However its not quite that straightforward.
In addition to finding matches the need is to find a specific number of matches termed pass for discussion purpose.
A very small example is helpful to better understand this.
Working on 25 records only:
Using the tblVariable of two values 1 and 27 then the task is to find all matches of data containing 1 and 27 in any column of tblData. Shortened too:
This example would be incorrect(And is shortened for clarity). As it contains records with 1 and any other number.
Sorry got to continue next post
I have attached a sample database below to have a look at.
There is a table tblData this contains numbers. I have reduced it for this post to a few records the original has several millions.
A second table tblVariable contains another set of numbers.
The task is to search for matches in tblData…sounds simple enough. However its not quite that straightforward.
In addition to finding matches the need is to find a specific number of matches termed pass for discussion purpose.
A very small example is helpful to better understand this.
Working on 25 records only:
n1 | n2 | n3 | n4 | n5 | n6 | n7 |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
1 | 2 | 3 | 4 | 5 | 6 | 8 |
1 | 2 | 3 | 4 | 5 | 6 | 9 |
1 | 2 | 3 | 4 | 5 | 6 | 10 |
1 | 2 | 3 | 4 | 5 | 6 | 11 |
1 | 2 | 3 | 4 | 5 | 6 | 12 |
1 | 2 | 3 | 4 | 5 | 6 | 13 |
1 | 2 | 3 | 4 | 5 | 6 | 14 |
1 | 2 | 3 | 4 | 5 | 6 | 15 |
1 | 2 | 3 | 4 | 5 | 6 | 16 |
1 | 2 | 3 | 4 | 5 | 6 | 17 |
1 | 2 | 3 | 4 | 5 | 6 | 18 |
1 | 2 | 3 | 4 | 5 | 6 | 19 |
1 | 2 | 3 | 4 | 5 | 6 | 20 |
1 | 2 | 3 | 4 | 5 | 6 | 21 |
1 | 2 | 3 | 4 | 5 | 6 | 22 |
1 | 2 | 3 | 4 | 5 | 6 | 23 |
1 | 2 | 3 | 4 | 5 | 6 | 24 |
1 | 2 | 3 | 4 | 5 | 6 | 25 |
1 | 2 | 3 | 4 | 5 | 6 | 26 |
1 | 2 | 3 | 4 | 5 | 6 | 27 |
1 | 2 | 3 | 4 | 5 | 6 | 28 |
1 | 2 | 3 | 4 | 5 | 6 | 29 |
1 | 2 | 3 | 4 | 5 | 6 | 30 |
1 | 2 | 3 | 4 | 5 | 6 | 31 |
Using the tblVariable of two values 1 and 27 then the task is to find all matches of data containing 1 and 27 in any column of tblData. Shortened too:
n1 | n2 | n3 | n4 | n5 | n6 | n7 |
1 | 2 | 3 | 4 | 5 | 6 | 20 |
1 | 2 | 3 | 4 | 5 | 6 | 8 |
1 | 2 | 3 | 4 | 5 | 6 | 9 |
1 | 2 | 3 | 4 | 5 | 6 | 10 |
1 | 2 | 3 | 4 | 5 | 6 | 11 |
1 | 2 | 3 | 4 | 5 | 6 | 27 |
Sorry got to continue next post