Can i stored the results of a select queries into a dynamic array so that later on i can use the array in another select query<br>
<br>
What i am trying to do is write something that is simiular to a stored proceduce.
It sounds to me like what you want is a make-table query. In your select query, click on Query in the menu bar and then click on Make Table Query. Enter the name of a table into which you want to store the results of the query. Each time the query is run, it will recreate this table, deleting any existing one with the same name in the process.<br>
If you want to suppress the message that asks whether you really want to delete this table, then remember to set SetWarnings to off before the query in your macro or procedure and then set it back on.
If you just want to use results of a query as criteria of the next one, try nested queries. Use SELECT clauses as criterias:<br>
<br>
SELECT Field1, Field2 FROM Table2<br>
WHERE Table2.Field1 IN (SELECT Table1.Field1 FROM Table1 WHERE Field1 LIKE 'Something')<br>
<br>
Be careful with huge data sets. Nesting takes time to run.<br>
<br>
Al
I HAVE A QUESTION WITH A QUERY -
I MADE A QUERY TO FORMULATE A WEEK FOR MY DATES : WEEKFORMAT([DATE],"ww") - THIS RETURNS A WEEK # FOR MY DATES, THIS WORKS OKAY
MY PROBLEM IS, WHEN I GET INTO MY NEXT QUERY I AM GROUPING ON WEEK # (IN ASCENDING ORDER) AND SUMMING A FEW OTHER FIELDS, THIS WORKS OKAY OTHER THAN MY WEEKS IN ORDER ARE SHOWING WEEK 10,11,9 ANY WAY I CHANGE IT THE WEEK 9 IS IN THE MIDDLE NOT THE FIRST RECORD? ANY HELP WOULD BE APPRECIATED. (THOSE ARE THE ONLY 3 WEEKS IN MY QUERY SO FAR)
THANK YOU
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.