Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to group on weeks in a cursor
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00954200
Message ID:
00954205
Views:
15
This message has been marked as the solution to the initial question of the thread.
>Hi All
>I have a table Transfer (TransDay D, TranNo I). I want a result cursor containg only four records (each record will be sum(TranNo) for one week) In other words There are 30 or 31 records and i want to group them in to 4 weeks. Any simple way?
SELECT YEAR(TransDay), WEEK(TransDay), SUM(TranNo) ;
  FROM Transfer ;
  GROUP BY 1,2 ;
  INTO CURSOR crsResult
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform