How to use sum in query?

  • Thread starter Thread starter tom
  • Start date Start date
T

tom

I have a query that has an extension field and a second
field which sums the cost for each invoice. I would
like to use this sum value later in the same query
something as follows which does not work

[extension]-[sumofcost]

Is this possible or is another query required?

I have noticed that the less queries the easier to
understand the DB.
 
You can't refer to a calculated column like that. You must repeat the
calculation:

[extension] - ([basecost] + [field1] + [tax])
 

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

Back
Top