View Single Post
  #26  
Old December 6th, 2005, 05:11 PM posted to microsoft.public.access,microsoft.public.access.queries,microsoft.public.access.formscoding
external usenet poster
 
Posts: n/a
Default General solution for missing sequence numbers

Yes, some cannot. In particular, a self-join cannot (as far as I know),
which is exactly what I used here. I'm not certain that I agree with the
notion that SQL is more readable with aliases than without, it seems to me
to be just one more re-direction that must be kept in mind when tracking or
debugging a statement. But that's just my opinion, worth exactly what you
paid for it. And I'm far from being a SQL expert, you may be right. I'd be
interested in your thoughts on how it improves readability.

And as for the question, well, I was just answering it - I didn't mean to
sound snippy. The way you worded it made me think that you really didn't
know what the difference between the statements was, but if you've been
writing SQL queries for years, you probably know more about it than I do.

--
Pete



"Chris2" píše v diskusním
příspěvku ...

"Peter Danes" wrote in message
...
"Chris2"

"Peter Danes" wrote in message
...

snip


snip



Sincerely,

Chris O.



There are three differences:

1. Your example is the same as my first example which returns only

the
"greatest +1", except that you additionally include an alias to

the table,
the "AS MT1" at the end of the statement. It doesn't hurt

anything, but
isn't really necessary.


Using table aliases may not be necessary, but I haven't written a
query more complicated than SELECT * FROM table_name in years
without them. The readability of SQL is greatly improved by their
use, and some queries cannot be written without them.

In any event, table aliases were not the purpose of my post.

I was only asking a question.


Sincerely,

Chris O.