Originally Posted by
Ajax
sure, but don't threat this thread to cover any specific topic, start a new one. With regards this issue there is a cheat you can use so you can see what it looks like
1. create your two queries
2. open the first query, go to the sql window
3. copy the whole code, but exclude the semi colon at the end
4. open the second query and go to the sql window
5. part of the code will be something like
FROM Query1
6. Insert double brackets between the two words
FROM () Query1
7. Now paste the code from query1 between the two brackets
8. run the query - if all OK, you can delete the first query
With regards the query code generated by Access there are lots and lots of brackets. Most are not required and their removal will have no impact on performance but a huge improvement in readability
access all also always include the table name, these can usually be removed because all field names should be unique. e.g.
SELECT Table1.Field1
FROM Table1
can just be
SELECT Field1
FROM Table1
There are some potential exceptions depending on your naming style - having ID as the name of the autonumber field in all tables means you then need to identify which table ID you are referring to.