Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Positive, Negative and Absolute Value Sum Totals

Status
Not open for further replies.

nancier

MIS
Dec 27, 2004
50
US
I have a table with 10,000 various negative and positive Amounts. I am trying to do a query where I get 1 positive Total, 1 Negative total and 1 Absolute Value Total. It seems I can only get one at a time to work. If I use a union query, I can't get it to work because I can't seem to use the Amt column more than once. Below query gives just the negative total. Any idea how to get all three at once?

SELECT Sum(tblAmount.Amt) AS SumOfAmt
FROM tblAmount
HAVING (((tblAmount.Amt)<0));

I would like the results to look like this

ABS........Positive........Negative
-----------------------------------
80,000.....100,000.........20,000
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top