I have a cursor with the following three fields: Part, Month (YYYYMM) and Sales.
The combination of Part + Month is unique, as that has been previously calculated, and there are no records for months where Sales = 0
I need to calculate the sum of sales for the first twelve months that occur in this cursor for each part, answering the question "For each part, what is the total sales for the first twelve months in which sales occurred, recognizing that they might not be consecutive?".
Is there a way to do this in a single statement?
Jim Nelson
Newbury Park, CA