query question

  • Thread starter Thread starter cinnie
  • Start date Start date
C

cinnie

greetings

Lets say I have 2 tables: the 1st table has a field, ID1, with records
a,b,c,d... and the 2nd table has a field, ID2, with records p,q,r,s...

What is a good way to make a query with Fields ID1 and ID2 that show all
combinations of 2 records, 1 from each table? Like this:

ID1 ID2
a p
a q
a r
a s
....etc
b p
b q
....etc

thank you
 
greetings

Lets say I have 2 tables: the 1st table has a field, ID1, with records
a,b,c,d... and the 2nd table has a field, ID2, with records p,q,r,s...

What is a good way to make a query with Fields ID1 and ID2 that show all
combinations of 2 records, 1 from each table? Like this:

ID1 ID2
a p
a q
a r
a s
...etc
b p
b q
...etc

thank you

A "Cartesian join" will do this. Just create a query; add both tables; don't
specify *any* join line. If Table1 has 1000 records and Table2 has 2000,
you'll get all 2,000,000 possible combinations.

This most often happens by mistake... but once in a while it's a legitimate
and useful thing to do.
 
Back
Top