Access 2003 - Combine data from 4 query then update to 1 table

I

izwan noor

Dear sir,

Good morning..My problem is i've 4 query, then i would like to extract the
data from these query then update to 1 table using 1 query.

For example.

Query 1: SUM_X
Query 2: SUM_X
Query 3: SUM_X
Query 4: SUM_X

Table_1
---------
NO DATA SUM_X
1 Query 1 XXXXX
2 Query 2 XXXXX
3 Query 3 XXXXX
4 Query 4 XXXXX

These table will be update if the user use "combine query". How could i do
these?Pleae help me...

Thank you..
 
A

Allen Browne

Use a UNION query to combine the data from 4 sources. Then change it into an
Append query to write the results to the target table.

Access cannot show you a UNION query graphically, so you will be working in
SQL language here.

Presumably this is just for import purposes, i.e. you don't really have 4
different tables in the end.
 
I

izwan noor

Dear Allen,

how could i change from UNION query to APPEND query..It is i've to write it
in SQL language?

Thank you....
 
A

Allen Browne

Yes: you will need to write this.

However, you can mock up an example easily.
Create a query based on just one table.
Change it to an Append query (Append on Query menu.)
Map the fields.
Switch to SQL View.
You now have an example of what the Append query statement should look like.
Provided the fields are in the same order as your UNION query, you may be
able to just copy'n'paste the first clause of the Append query, i.e. INSERT
INTO ...
 

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