T
Tommy
Hi All,
I need to run any keyword search on the 3 tables, each table has one
specific field containing the information. For example, I type in "test" in
the search box/query, it will search all 3 fields in 3 different tables, and
provide me the hits if any. can you please help? thanks. I have the SQL
below, but I have to put in the same keyword three times in order to get the
hits, is there a way to type once and get the result?
SELECT Attorneys3.*, Attorneys3.PracticeArea
FROM Attorneys3
WHERE ((Attorneys3.PracticeArea) Like "*" & [Enter Search for Attorney3
Table] & "*");
UNION
SELECT Attorneys2.*,Attorneys2.PracticeArea
FROM Attorneys2
WHERE (((Attorneys2.PracticeArea) Like "*" & [Enter Search for Attorney2
Table] & "*"));
UNION
SELECT Attorneys1.*,Attorneys1.PracticeArea
FROM Attorneys1
WHERE (((Attorneys1.PracticeArea) Like "*" & [Enter Search for Attorney1
Table] & "*"));
I need to run any keyword search on the 3 tables, each table has one
specific field containing the information. For example, I type in "test" in
the search box/query, it will search all 3 fields in 3 different tables, and
provide me the hits if any. can you please help? thanks. I have the SQL
below, but I have to put in the same keyword three times in order to get the
hits, is there a way to type once and get the result?
SELECT Attorneys3.*, Attorneys3.PracticeArea
FROM Attorneys3
WHERE ((Attorneys3.PracticeArea) Like "*" & [Enter Search for Attorney3
Table] & "*");
UNION
SELECT Attorneys2.*,Attorneys2.PracticeArea
FROM Attorneys2
WHERE (((Attorneys2.PracticeArea) Like "*" & [Enter Search for Attorney2
Table] & "*"));
UNION
SELECT Attorneys1.*,Attorneys1.PracticeArea
FROM Attorneys1
WHERE (((Attorneys1.PracticeArea) Like "*" & [Enter Search for Attorney1
Table] & "*"));