Query in Multiple Fields

G

Guest

I have two tables with mostly the same fields. Specifically, they both
contain a field called "Author." I would like to design a query that allows
me to search in both "Author" fields, while only having to use one
parameter/search term, and so the resulting table contains the results from
both fields.

Basically, they are nearly identical tables - one of them got too big (2
GB), so I had to create a second one of the same kind. Now, I would like to
be able to search in both at the same time, without having to query twice,
and so it all shows up in one resultant table. Sorry if this is confusing!
Thanks.
 
K

kingston via AccessMonster.com

Since there probably is no valid join between the two tables, I suggest you
make an SQL UNION query:

SELECT ... FROM Table1 WHERE Table1.[Author]=[Enter Name]
UNION SELECT ... FROM Table2 WHERE Table2.[Author]=[Enter Name];

By using the same parameter, I think only one prompt will be presented.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top