Querys referencing other Querys?

rschultz

Registered User.
Local time
Today, 17:41
Joined
Apr 25, 2001
Messages
96
I work with a couple people who do some programming in Access. They both have queries that reference other queries. To me it seems like spaghetti code. What's the scoop on that? Is it acceptable or bad form?
 
Is it acceptable?. most certainly!

you can do some very powerful data manipulation with nested queries.

al
 
hmmm, okay thanks. Any suggestions where I can get any ideas about them?
 
visit the MS download site, and get a copy of Qrysmp97. (sample queries) lots of good ideas and tips...

hth,
al
 
Pat: Thanks for the great explaination.

pcs:I went to the Microsoft download page and searched for keywords "Qrysmp97" but I got no hits.
 
In regard to queries referencing other queries:

Although there is probably an efficiency limit for this, it is a very modular way to save common filtration rules that you then can join with other queries to get detailed data about specific things.

We sometimes have to select info from our table based on as many as 7 criteria. So we wrote a query to do the select and produce names. (Basically, we unchecked the "include" boxes in the query design view.)

Now, when we have to do something using this list of complex criteria, we just write a JOIN of the main table to that query based on the selected item's name (names are unique keys in this case). We don't have to rewrite the complex query with so many criteria. And our action queries on these items are also very similar.

I would vote for using queries based on other queries as being a good idea.
 

Users who are viewing this thread

Back
Top Bottom