473,320 Members | 1,861 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.

access 97: select into/insert into sql question

Here is a simple question regarding insert into and select insert into
statements. I have the follwing sql from my table make query. how
can i add other query with the same field names as tbl1? basically, i
will have 2 other queries to insert into tblCombine. when i did add
the other 2 queries, i ended up with new fields for instance,
tbl1.field1, tbl1.field2, tbl2.field1, tbl2.field2, tbl3.field1.,
tbl3.field2 in my tblCombine. i would like the end result to only be
field1 and field2 with data from all three tbl1, tbl2, tbl3.

SELECT tbl1.* , tbl2.* , tbl3.* INTO tblCombine
FROM tbl1, tbl2, tbl3;

thanks in advance, jung
Nov 12 '05 #1
2 4701
If I understand your question correctly, you might want to combine tbl1,
tbl2 and tbl3 using a UNION query.
Let's call in MyUnionQuery.

Then you can write code like this:
SELECT Field1,Field2 INTO tblCombine FROM MyUnionQuery

HTH
- Turtle

"JMCN" <pi******@yahoo.fr> wrote in message
news:27**************************@posting.google.c om...
Here is a simple question regarding insert into and select insert into
statements. I have the follwing sql from my table make query. how
can i add other query with the same field names as tbl1? basically, i
will have 2 other queries to insert into tblCombine. when i did add
the other 2 queries, i ended up with new fields for instance,
tbl1.field1, tbl1.field2, tbl2.field1, tbl2.field2, tbl3.field1.,
tbl3.field2 in my tblCombine. i would like the end result to only be
field1 and field2 with data from all three tbl1, tbl2, tbl3.

SELECT tbl1.* , tbl2.* , tbl3.* INTO tblCombine
FROM tbl1, tbl2, tbl3;

thanks in advance, jung

Nov 12 '05 #2
"MacDermott" <ma********@nospam.com> wrote in message news:<uP*******************@newsread3.news.atl.ear thlink.net>...
If I understand your question correctly, you might want to combine tbl1,
tbl2 and tbl3 using a UNION query.
Let's call in MyUnionQuery.

Then you can write code like this:
SELECT Field1,Field2 INTO tblCombine FROM MyUnionQuery

HTH
- Turtle

thanks! i totally forgot about the union query option!
jung
Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
0
by: ImraneA | last post by:
Hi there I had pleasure of upsizing Access v97 db to Access v2K/SQL 2K. Wish to provide some knowledge gained back to community - hopefully help others. 1.Question how do you test stored...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
12
by: Mike | last post by:
I have an Access DB that I upsized to a SQL server DB. The tables that I upsized I can't seem to modify. I wanted to insert some data into the table and I am getting the following error: ...
22
by: TC | last post by:
I have an Access database application with a lot of custom row functions written in VBA. In other words, a lot of queries contain calculated fields which use functions defined in the modules. I...
4
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is...
1
by: ladybanks | last post by:
I am trying to load data from two separate tables into a third table. Log the load time into another table. However anytime i run my scripts in Access, the data doesnt load and i get variable exist...
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
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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

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.