How to produce a Cartesian Table?

  • Thread starter Thread starter Ali
  • Start date Start date
A

Ali

Weird question... how do I produce a Cartesian Table in Access using the
JOIN syntax? For example in SQL Server you could write

SELECT a.SomeField
FROM SomeTable1 a, SomeTable b

Is there a way to do this using the TableName JOIN OtherTableName syntax?
 
Ali,

Try:

SELECT TableA.Field1, TableB.FieldX
FROM TableA, TableB

HTH,
Nikos
 
Thank you both for your responses. I apoligize that my question was not
very clear. I want to create a Cartesian table but using ANSI SQL JOIN
syntax...

SELECT a.SomeField
FROM SomeTable1 a INNER JOIN SomeTable b ON a.SomeField = b.SomeField


NOT using the old style syntax like this:
Is this even possible in Access?
 
Thank you both for your responses. I apoligize that my question was not
very clear. I want to create a Cartesian table but using ANSI SQL JOIN
syntax...

SELECT a.SomeField
FROM SomeTable1 a INNER JOIN SomeTable b ON a.SomeField = b.SomeField


NOT using the old style syntax like this:

A "Cartesian Join" - in my mind, at least - is a query with no join at
all, one in which every record in A is paired with every record in B.

What you post is an Inner Join (not a Cartesian Join), and works
exactly as you have written it in Access; the SQL-94 syntax is in fact
the default if you use the query grid. You can write such older SQL-88
queries (with a WHERE clause join) if you wish, in the SQL window, but
they won't be updateable nor as efficient as the default SQL-94
syntax.


John W. Vinson[MVP]
 
A "Cartesian Join" - in my mind, at least - is a query with no join at
all, one in which every record in A is paired with every record in B.

What you post is an Inner Join (not a Cartesian Join), and works
exactly as you have written it in Access;

Thanks for the reply. Yes, that particular example definitely IS an inner
join which is definitely NOT a cartesian join ;-) That was an attempt to
clarify the original question:
SELECT a.SomeField
FROM SomeTable1 a, SomeTable b

Is there a way to do this using the TableName JOIN OtherTableName syntax?



Turns out what I was looking for is a CROSS JOIN.
 

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

Back
Top