consecutive tables

  • Thread starter Thread starter Yossi evenzur
  • Start date Start date
Y

Yossi evenzur

Hi Experts
I'd like to have to chain 2 tables with identical fields, where the only
difference is the dates, e.g. one table from date 01/1/2008 to 01/05/2008 and
the other is from 01/04/2008 to 01/10/2008 and there is some overlapping
between the tables. can someone assist me?
 
It sounds as if you might want to use a UNION query to do this.

Union queries can not be built using the query view window, but must be built
in the SQL window. You can get a running start on this ( assuming all the
field names are the same). If not then you get to do some typing to get the
correct field names in the second query.

Open a new query
Add ONE of your two tables
Select all the fields you want to display and set up any filtering criteria.
Select View; SQL from the menu

Select the text and copy it.
Remove the ending semi-colon
Type UNION ALL
Paste the text back in and edit the table name to the name of your other table

You should end up with something that looks like
SELECT FieldA, FieldB, FieldC
FROM Table1
UNION ALL
SELECT FieldA, FieldB, FieldC
FROM Table2;


John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 

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

Similar Threads


Back
Top