B
BodiKlamph
Hello, thx for reading.
shopping for groceries will be a perfect analogy for my needs.
What I want is to get the total bill (sum of all items) for shoppers in
any given day, but only for the people with ketchup or cereal on their
receipt.
however, unlike a real grocery receipt, i don't store a "total" field
in the table, only an amount field that i will later sum.
so, in pseudo sql:
select sum([amount]) from [details] where any [item] like "*cereal*" or
"*ketchup*" and date=#1/11/05#
it's the "any" part of the query that has got me stumped. I can create
a subquery that searches for the desired items, but I can't figure out
how to sum each persons bill based on finding 1 or more of those items.
possible?
thx
shopping for groceries will be a perfect analogy for my needs.
What I want is to get the total bill (sum of all items) for shoppers in
any given day, but only for the people with ketchup or cereal on their
receipt.
however, unlike a real grocery receipt, i don't store a "total" field
in the table, only an amount field that i will later sum.
so, in pseudo sql:
select sum([amount]) from [details] where any [item] like "*cereal*" or
"*ketchup*" and date=#1/11/05#
it's the "any" part of the query that has got me stumped. I can create
a subquery that searches for the desired items, but I can't figure out
how to sum each persons bill based on finding 1 or more of those items.
possible?
thx