Queries re-used problem.

D

Dawn

Dear all,
I have some monthly-rotine work to do ,inorder not to write the same
queries every month,I’ve put the problem on this discussion group,and Mr. Ken
Sheridan and Mr. George Nicholson have kindly guided me as to save the
monthly data tables as the name current or previous,thus the written queries
aimed at the table named current or previous can be re-uesd.
But if I choose this way,there’s still a problem I want to trun to you for
help.
As I named two tables with table current and table previous.I do many
queries with them,I also saved those queries.And those queries are not all
generated from the 2 tables,some are generated from the queries.
When the next period comes,I replaced the table previous with the data of
table current,and downloading the table current.When I tried to re-use these
queries, because some queries depend on other queries.What’s the
opening-sequence for these queries to make sure the queries use the correct
data source?Will open all these queries avoid the open queries turn by turn
problem?
Or maybe there’s other way to solve the problem?
Best regards.
Dawn Wu
Shanghai,China
 
M

Marco Pagliero

As I named two tables with table current and table previous.I do many
queries with them,I also saved those queries.And those queries are not all
generated from the 2 tables,some are generated from the queries.
When the next period comes,I replaced the table previous with the
data of table current,and downloading the table current.When I tried to
re-use these queries, because some queries depend on other
queries.What’s the opening-sequence for these queries to make sure
the queries use the correct data source?Will open all these queries
avoid the open queries turn by turn problem?
If I understand your question, you are not sure that the queries that
depend on other queries are new and updated after you change the
tables.

As far as I remember, when you start a query you saved, it looks if it
depends on another query and if yes it starts it and waits for. The
other query makes the same and waits. The query that finds that it
depends on a table then opens the table, takes the records and give
them to the query that started it and so on back along the chain. Then
the query you started gives you the records. These records come always
from the tables as they are now, in the moment you started the query.

The sequence is not important. If a query needs another query it will
start it.
It is only important that you close all queries before you change the
tables.

So it is sure that the data you receive from every query after you
change the tables are from the new table and not from the old one.

In other words, the query you save is like a question. The query you
start gives the answer. When you save a query it is the question that
is saved, not the answer.

Greetings
Marco p
 
D

Dawn

Marco,
Thanks for your expalination.I am sure your 100% understand my question,and
give a helpful answer.
best regards,
Dawn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top