Criteria Help

  • Thread starter Thread starter Christopher Austin
  • Start date Start date
C

Christopher Austin

In a query, I am using the DSum function to add all of the
values in a domain from a table. I am trying to add
criteria, inside the DSum function, to this so that it
only chooses certain values.

ex. item# cost
1 $1
1 $2
2 $3

I would like to be able to query item #1 and retrieve $3,
however, I can only get it to sum the entire list
resulting in $6. How can I fix this?
 
try this using your example select item#,sum(cost) from table where item# =1
group by item#
 
Back
Top