This SEEMS simple, and I know it can be done with TSQL in ASP because I have the working program in front of me. But ASP uses a strquotereplace function and that doesn't exist in MS Access SQL. Anyway, here is what I need to do ...
Table1 has a field called LastName. Table2 has a field called Name, such that:
Table1/LastName
Atkins
Benjamin
Carlson
Dawson
Table2/Name
Adams, Thomas
Benjamin, Mary
Christopher, John
Donaldson, Benjamin
What I need to do is SELECT records in Table2 where any part of the Name string matches to LastName in Table1.
In the example above, I would want two hits ... LastName "Benjamin" and Name "Benjamin, Mary" ... and LastName "Benjamin" and Name "Donaldson, Benjamin"
I've tried various combinations of = and LIKE and % and nothing will give me the two hits I want. Most give me zero hits.
Can anybody tell me how to code this seemingly simple statement to make it work properly? Thanks!
Scott
Table1 has a field called LastName. Table2 has a field called Name, such that:
Table1/LastName
Atkins
Benjamin
Carlson
Dawson
Table2/Name
Adams, Thomas
Benjamin, Mary
Christopher, John
Donaldson, Benjamin
What I need to do is SELECT records in Table2 where any part of the Name string matches to LastName in Table1.
In the example above, I would want two hits ... LastName "Benjamin" and Name "Benjamin, Mary" ... and LastName "Benjamin" and Name "Donaldson, Benjamin"
I've tried various combinations of = and LIKE and % and nothing will give me the two hits I want. Most give me zero hits.
Can anybody tell me how to code this seemingly simple statement to make it work properly? Thanks!
Scott