Access query question,
if i have a table with colums A , B and C ...
A is text
B is a boolean
C is a long
how would i write the SQL to do get following 2 Columns
display unique A's
sum column C
BUT if B is false then C is a negative number
Example...
ColA ColB ColC
CompanyA True 10
CompanyB True 12
CompanyB True 12
CompanyC True 20
CompanyA False 5
Then i would need this result set
CompanyA 5
CompanyB 24
CompanyC 20
HELP !
-tryp
if i have a table with colums A , B and C ...
A is text
B is a boolean
C is a long
how would i write the SQL to do get following 2 Columns
display unique A's
sum column C
BUT if B is false then C is a negative number
Example...
ColA ColB ColC
CompanyA True 10
CompanyB True 12
CompanyB True 12
CompanyC True 20
CompanyA False 5
Then i would need this result set
CompanyA 5
CompanyB 24
CompanyC 20
HELP !
-tryp