SubQueryInFROM.mdb ( beginner ) |
Post Reply |
Author | |
Roger Carlson
Microsoft MVP Joined: 20 Feb 2008 Status: Offline Points: 261 |
Post Options
Thanks(0)
Posted: 21 Jul 2008 at 10:38pm |
Please consider donating $1 per sample downloaded, find out why here.
Demonstrates how to use a subquery in the FROM clause of a query. There is a seriously weird, undocumented format for using a subquery in the From clause - essentially as another table. It won't work if you have spaces or special characters in the names of tables or fields (which I don't like anyway). Because of the syntax, *this* sort of subquery cannot itself contain a subquery of the same format. The syntax is: [insert your query here]. As SomeAlias The left and right square brackets are required, the dot after the right bracket is required, and the As and alias are required. You can't do ANYTHING that would require the use of square brackets, inside the square brackets - that's why no spaces or special characters in names. **Thanks to Don Edwards for sharing this**
Download
Access 2000 (24 KB): uploads/5/SubQueryInFROM2k.zip |
|
|
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |