P
Patrick Briggs
Hi,
This is a variation of an earlier question I asked.
I'm using Access 2003 on a Windows XP box.
I've got one table
(Donor_Lenghts_tbl)
of individuals donors and organization donors. I don't have a donor type
field to work off of. I do have the LastName column though - it's has
legitimate last names for the Individuals and then full organization names
for Organizations.
I have another table of one column with a list of search terms
(Org_Criteria_tbl)
populated with about 200 terms (church, temple, club etc.)
I know I can use a Non-equi join to do a query that identifies the
Organization donors within the Donor_Lengths_tbl:
SELECT *
FROM Donor_Lengths_tbl AS D
INNER JOIN Org_Criteria_tbl AS O ON D.Ln Like "* " & O.Org_Criteria & " *"
This successfully finds any Organization donors in the Donor_Lengths_tbl
which are in the middle of the field Ln.
I'd like to also be able to also get the Organization donors in which the
search term falls at the beginning or at the end of Ln field.
This didn't work for me:
SELECT *
FROM Donor_Lengths_tbl AS D
INNER JOIN Org_Criteria_tbl AS O ON D.Ln Like "* " & O.Org_Criteria & " *"
OR INNER JOIN Org_Criteria_tbl AS O ON D.Ln Like O.Org_Critieria & " *"
OR INNER JOIN Org_Criteria_tbl AS O ON D.Ln Like "* " & O.Org_Criteria;
Other than running three separate queries using each of the above types of
non-equi joins, is there another option?
Google searching for "multi-part non-equi join" and looking up "non-equi
join" posts in this forum weren't fruitful so I thought I'd ask.
Thanks in advance,
Patrick Briggs,
Pasadena, CA
This is a variation of an earlier question I asked.
I'm using Access 2003 on a Windows XP box.
I've got one table
(Donor_Lenghts_tbl)
of individuals donors and organization donors. I don't have a donor type
field to work off of. I do have the LastName column though - it's has
legitimate last names for the Individuals and then full organization names
for Organizations.
I have another table of one column with a list of search terms
(Org_Criteria_tbl)
populated with about 200 terms (church, temple, club etc.)
I know I can use a Non-equi join to do a query that identifies the
Organization donors within the Donor_Lengths_tbl:
SELECT *
FROM Donor_Lengths_tbl AS D
INNER JOIN Org_Criteria_tbl AS O ON D.Ln Like "* " & O.Org_Criteria & " *"
This successfully finds any Organization donors in the Donor_Lengths_tbl
which are in the middle of the field Ln.
I'd like to also be able to also get the Organization donors in which the
search term falls at the beginning or at the end of Ln field.
This didn't work for me:
SELECT *
FROM Donor_Lengths_tbl AS D
INNER JOIN Org_Criteria_tbl AS O ON D.Ln Like "* " & O.Org_Criteria & " *"
OR INNER JOIN Org_Criteria_tbl AS O ON D.Ln Like O.Org_Critieria & " *"
OR INNER JOIN Org_Criteria_tbl AS O ON D.Ln Like "* " & O.Org_Criteria;
Other than running three separate queries using each of the above types of
non-equi joins, is there another option?
Google searching for "multi-part non-equi join" and looking up "non-equi
join" posts in this forum weren't fruitful so I thought I'd ask.
Thanks in advance,
Patrick Briggs,
Pasadena, CA