I am trying to design a query that will return how many times my first tables texts occur in a range of texts in a second table.
Static texts table named "vals" looks like below and there are many rows that will stay the same
tex
*01*02*
*02*03*
*03*04*
and my second table "data" is a range of values that will change from time to time looking something like this
dats
01-02-03
01-02-03-04-05
01-02-09-28-100
02-03-100
01-02-100
01-02-09
So from what is listed above im hoping that the query will end up displaying
tex counts
*01*02* 5
*02*03* 3
*03*04* 1
so each vals.tex(non repeating, constant) values are getting checked against all of the data.dats (subject to change)
i've been using instr and count but i cant seem to make up a sql statement/query correctly. In excel i would do the same using countif. thanks for any help you can provide in what the query/sql statement would look like.