how to select the abs value?

qwang1115

Registered User.
Local time
Yesterday, 23:09
Joined
Oct 24, 2008
Messages
14
Hi,

I have a table with following data:

Acct# Cash$
1 $0.00
1 -$0.02
2 $0.00
2 0.02

I would like to get the following result:

Acct# Cash$
1 -$0.02
2 $0.02

how to just use query (not VBA code) to the result?

Thank!
 
If that is exactly how your data is just select where cash <> 0

Brian
 
Qwang,

Code:
Select [Acct#], Sum([Cash$])
From   YourTable
Group By [Acct#]

Note the brackets around the names of your fields. It is generally
better to avoid using special characters like "#" and "$".

hth,
Wayne
 

Users who are viewing this thread

Back
Top Bottom