473,320 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

New Table to contain records from two queries

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.
May 6 '07 #1
2 1258
Lysander
344 Expert 100+
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.
May 6 '07 #2
Thanks for help. I will try both options.
May 6 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Randell D. | last post by:
Folks, My internet access is intermitent until I get my own connection inside the next ten days - I say this so that I can thank in advance who ever gives a few seconds to read/answer my...
7
by: Nicolae Fieraru | last post by:
I have two tables, they contain: Table1: ID1, Name1, Address1, Purchase1 Table2: ID2, Name2, Address2, Purchase2 I need a query which creates Table3 with content from Table1 and Table2. The...
2
by: MLH | last post by:
We have a table (tblClients) with several thousand records. Because of organizational structure, changes to those records are maintained in a separate database. Weekly, about a dozen or so clients...
3
by: JDiamond | last post by:
Hi, I have a table called Hosts. The Hosts table contains the following fields: Each field represents a step in the project. The tech that completes each step initials the respective...
3
by: BrianDP | last post by:
I have a database with a split front end/back end. There is a key table in the back end called Catalog, and it is sort of a central key table for all sorts of things. It's a list of all the jobs...
2
by: mvl_groups_user | last post by:
I am trying to look up data on about 1000 records from a 6 million record view on a DB2 database using msaccess. The 6 million record DB2 view is connected through a linked ODBC table (table A),...
2
by: headache | last post by:
Greetings. I'm a first time poster, so feel free to clue me in to any protocol I may have inadvertently violated. I have an issue that has arisen where I need to join 3 tables where 2 of the 3...
8
by: rshivaraman | last post by:
Hi : I have a TableA with around 10 columns with varchar and numeric datatypes It has 500 million records and its size is 999999999 KB. i believe it is kb i got this data after running...
3
by: jonceramic | last post by:
Hi All, I need to know the best way to set up a datawarehouse/materialized view for doing statistics/graphs in Access. My crosstabs and unions are getting too complicated to crunch in real...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.