By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,145 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,145 IT Pros & Developers. It's quick & easy.

access 97: select into/insert into sql question

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.