Sirs,
First, I have 2 tables
Table 1:
ID L1 L2 L3 L4 L5
------------------------------------
1 a c e g i
2 a c d g i
3 l n p r t
Table 2:
ID L1 L2 L3 L4 L5 L6
----------------------------------------------
9 l n o p r t
8 a c d e g i
7 a b c d e f
I would like a select to look up the data set from Table 1 (L1 through L5) within the data set from Table 2 (L1 to L6), so that the result would be + or - thus:
Result:
ID Count
-------------
9 1
8 2
7 0
Since the ID 9 record in Table 2 has 1 record of Table 1 that fits in, just as ID 8 has 2 and 7 has none.
Thanks for the help