query from an existing query result

  • Thread starter Thread starter the_louv
  • Start date Start date
T

the_louv

Guest
Hi,

I'm writing a database for a record label. Here is the issue. I need to calculate total number of CD's sold for a specific state, and CD Name. I have a query that asks for the name of the state, and CD Name, it then produces the total number of records from this result. This works fine.

My problem is that I need to use something like a DSUM on the total number of CD Sold for the this given result. I have tried to use the previous query as a Make-Query, and then using the generated table in my next query. However, this has not worked, it just reproduces the old results with out tallying them up into one general record.

Is there anyway to use one query's results in another query.

Your help is greatly appreciated.
 
I don't understand what you are trying to sum (don't use domain functions in queries) but in the QBE, you can select either tables or queries or both so you don't have to make a temporty table from a query just to use it in another query.
 
Thanks for the help. What is QBE?
 
QBE - Query By Example Its the grid which one can use to construct queries rather than coding SQL

brian
 
When you go to the queries tab of the database container and select new, the wizard will prompt you to select the data source for the query. You can choose from a list of tables, a list of queries, or both. Once you have selected the tables/queries you need you can close the dialog. Then draw the appropriate join lines between the tables/queries and choose the columns you want from each. You can continue to work in the QBE view or switch to SQL view if that is more comfortable for you.
 

Users who are viewing this thread

Back
Top Bottom