Sub Queries - Grrrrr!

  • Thread starter Thread starter Andy Roberts
  • Start date Start date
A

Andy Roberts

Morning all,

I hope some of you can help.

I have a table of companies([AAI]) some of which are my
customers (marked by a customer field; [AAI].[customer
type]) .I have a second table ([Facility Active])
describing the ammount of money they owe(.[Amount]) by
different jobs done for them (.[Primary]).

I currently run 3 different queries to find the sum of the
amount owed by the type of job, only for my customers. I
then pull the results of the queries into a ,master
customer query.

I have been told that a better way to do this would be to
combine the three queries into the master customer query
by using a sub-query?? (is this right?!?)

Would anybody out there be able to help? I have been
trying to do this myself but have only succeeded in
messing up my database as it stands!!!! :o)

Many thanks in advance for any help anybody can give.

Andy
 
I'm not sure if you really need to change what you're doing right
now....creating and storing a query, and then using that query in another
query, often allows the queries to run faster than if you include subqueries
in one big query. Trial and error will tell you if you're better off using
what you already have.

However, in order for someone to provide suggestions, you'll need to provide
more information. Can you post the SQL statements of the different queries
that you're running now? Can you post info about the tables' structures?
 
Back
Top