Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Monthwise Total
Message
 
 
To
07/10/2004 23:59:30
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00949792
Message ID:
00949793
Views:
24
>Dear Sir,
>
>I have a table entitled Weights with following fields
>
>date	d(8)
>weight	n(4)
>cash	n(4)
>
>the data in dbf is as
>
>01/12/2003	2345	40
>01/12/2003	4587	80
>15/01/2004	6547	20
>16/02/2004	6584	40
>20/02/2004	1475	40
>
>I wnat to create a query who display following result
>
>Dec	6932	120
>Jan	6547	20
>Feb	8068	80
>
>It would be month wise total of weight and cash filed
>
>What should I write to make query?

Hi Tariq,
select left(cmonth(Date),3) as MonthName, sum(weight) as WeightTotal, sum(cash) as CashTotal ;
group by 1 into cursor curTotal
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform