The self-join works in Access, although you
obviously have to edit it by hand and once you do
so, it will not display in the query designer.
True, it's an SQL-only query from that point on. The EXISTS clause also has
to be coded in SQL in the criteria box, though, doesn't it? But at least you
can see it in the QBE window, whereas the self-join either doesn't show at
all or munches the SQL if it does display. No idea why, either, it doesn't
seem like it would have been all that hard for the Access boyz at MS to draw
a self-join line. SQL Server Management Studio does it just fine, even
though in many things, its graphic interface is not nearly as pretty as
Access's.
Speedwise, I doubt there would be a difference. The
self-join and the exists clause would both be
joining on key fields as well as non-key fields.
Really? That's good to know; I've been generally avoiding EXISTS because I
thought I had read somewhere that it was usually (not always) slower to use
a subquery than a self-join, and a couple of places where I had used it, the
results were rather slow. Of course, I was doing some oddball one-off stuff
and probably did not have an optimal structure.
So the choice, in my opinion, is primarily
stylistic.
Likely so, a great many things are largely a matter of taste, and quite
often, those are the arguments that generate the most heat and least light,
since they're personal preferences and not things that can be substantiated
or defended on any firm ground. Interesting thread, though, and I appreciate
your thoughts on the subject.
Petr