Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Monthwise Total
Message
From
11/10/2004 19:25:52
John White
Micro-Oriented Software Techniques, Inc.
Phoenix, Arizona, United States
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00949792
Message ID:
00950564
Views:
13
>>>
>>>select left(cmonth(Date),3) as MonthName, sum(weight) as WeightTotal, sum(cash) as CashTotal ;
>>>group by 1 into cursor curTotal
>>>
>>
>>What about different years? His data seems to have more than one year involved.
>
>Stupid me, of course I forgot about it.
>
>
>select year(date) as Year, left(cmonth(Date),3) as MonthName, sum(weight) as WeightTotal, sum(cash) as CashTotal ;
>group by 1,2  into cursor curTotal
Sorry, but I'm going to chime in. Not stupid at all, there was a flaw in the problem statement (specs). The example as given seemed to indicate accumulations by month only without regard to years. The original source data had multiple years which normally would initiate a request for a clarification of the specification. (Lotta words to say... not dumb, reasonable assumption IMO).
John White [MOST]
Previous
Reply
Map
View

Click here to load this message in the networking platform