i would like to know how many SOP30300.ITEMNMBR a customer purchased in a
given time period. i need to sum this SOP30300.QTYTOINV by SOP30300.ITEMNMBR
to get the total qty purchased for each product. i also need the total
amount in dollars (SOP30300.UNITPRCE * SOP30300.QTYTOINV).
can someone please help,
thanks,
Sum() enables you to get a cursor of results by making use of the group by
clause giving you one record for each group returned by the sql and the sum
of the fields that where in that group as your sub totals.
so in your example grouping by your docdate field would return totals for
everyday that you have entries. however if you want weekly totals you are
going to have to convert that date into a week number.
hope this helps.
"ricky" <ri...@discussions.microsoft.com> wrote in message
news:89616599-B845-4E92...@microsoft.com...