Connecting Tech Pros Worldwide Forums | Help | Site Map

New Table to contain records from two queries

Newbie
 
Join Date: May 2007
Posts: 7
#1: May 6 '07
Hello,

What I want to do is as follows
I have Table1 with 100 records.
Query1 contains 20 reocrds from Table1 which fuifill conditions mentioned in Query1
Query2 contains other 20records from Table1 which fulfills conditions mentioned in Query2
Records in Query1 and Query2 will always be different.
Now I want to combine Query1 & Query2 as new Table2
Table2 will now contain 20+20 = 40 records.
Some more records will be added to Table2 and used for generating further queries.


How to go about this.

Please help me.

Expert
 
Join Date: Apr 2007
Posts: 192
#2: May 6 '07

re: New Table to contain records from two queries


Quote:

Originally Posted by vandanavai

Hello,

What I want to do is as follows
I have Table1 with 100 records.
Query1 contains 20 reocrds from Table1 which fuifill conditions mentioned in Query1
Query2 contains other 20records from Table1 which fulfills conditions mentioned in Query2
Records in Query1 and Query2 will always be different.
Now I want to combine Query1 & Query2 as new Table2
Table2 will now contain 20+20 = 40 records.
Some more records will be added to Table2 and used for generating further queries.


How to go about this.

Please help me.


You can put more than 1 set of conditions in a query, so your query1 could select all records where this AND that AND other are met, then on the second row, put the other set of conditions. Records will be returned that meet all the conditions in row1 OR all the conditions in row2.

If this is not possible then try this

Make a new query, qunQuery3 which is a union query of 1 and 2

i.e. select * from query1 union select * from query2;

Then finally make a maketable query that selects all from qunQuery3 and creates table2.
Newbie
 
Join Date: May 2007
Posts: 7
#3: May 6 '07

re: New Table to contain records from two queries


Thanks for help. I will try both options.
Reply


Similar Microsoft Access / VBA bytes