Combine 2 tables

R

Robbie G

I have got 2 tables; 1 with a single column of data, e.g. A, B, C, etc. the
other with a single column of different data, e.g. 1, 2, 3, etc. I want to
create a table from these with 2 columns and all the combinations of the 2
data sets, e.g.
A 1
A 2
A 3
B 1
B 2
B 3
C 1
C 2
C 3
etc.

How do i do this?

thanks,
 
J

John W. Vinson

I have got 2 tables; 1 with a single column of data, e.g. A, B, C, etc. the
other with a single column of different data, e.g. 1, 2, 3, etc. I want to
create a table from these with 2 columns and all the combinations of the 2
data sets, e.g.
A 1
A 2
A 3
B 1
B 2
B 3
C 1
C 2
C 3
etc.

How do i do this?

thanks,

A "Cartesian Join" query will do this. Create a new query; add both tables,
with NO join line; select the single field from each table.

You can use this query directly as the (uneditable) recordsource for a Form,
or for a Report, or for an Export; if you want to actually create a table with
all the rows, change the query to a Make Table query and run it.

Note that if you have 1000 rows in each table you will get a 1,000,000 row
result. I presume that's what you want!
 

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