Re: Editing disabled by alternative to INNER JOIN
- From: "'69 Camaro" <ForwardZERO_SPAM.To.69Camaro@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 04 Aug 2007 09:28:47 GMT
Hi, Chris.
SELECT * FROM teachers INNER JOIN subjects ON
teachers.name=subjects.taught_by;
but I had typed in the equivalent
SELECT * FROM teachers, subjects WHERE
teachers.name=subjects.taught_by;
These two queries are _not_ equivalent in Jet (Access). The second query
uses a Cartesian Join, instead of an ANSI join. A Cartesian Join matches
every row in one table to every row in the other table (even when there is
no logical correlation). A query that uses a Cartesian Join is not
updateable, that's why you hear the beeps. The fact that you placed a WHERE
clause narrowed the results so that the results of the two queries look
identical. However, if you remove the WHERE clause in both queries and then
compare the results, you'll see two very different result sets. Only the
WHERE clause hides the effects of the Cartesian Join (except for the slower
speed when running the query).
I guess the INNER JOIN
construction makes possible some safety checking.
The INNER JOIN allows updateable recordsets, and is much more efficient in
Jet queries. It's easy to run out of resources when using a Cartesian Join
with larger data sets. They take a longer time for Jet to run than when
using an INNER JOIN, too.
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
.
- Follow-Ups:
- Re: Editing disabled by alternative to INNER JOIN
- From: Arch
- Re: Editing disabled by alternative to INNER JOIN
- From: David W. Fenton
- Re: Editing disabled by alternative to INNER JOIN
- References:
- Editing disabled by alternative to INNER JOIN
- From: cjakeman
- Editing disabled by alternative to INNER JOIN
- Prev by Date: Re: Open/print PDF-file from Access
- Next by Date: Re: total value of orders
- Previous by thread: Editing disabled by alternative to INNER JOIN
- Next by thread: Re: Editing disabled by alternative to INNER JOIN
- Index(es):
Relevant Pages
|