Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I fill a grid with monthly figures?
Message
From
18/01/2002 08:08:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
18/01/2002 08:01:29
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00606622
Message ID:
00606627
Views:
17
>Hi all...
>I need a grid that takes information from a sales table, summarize by month and display the results. Something like this:
>
>column1-------column2
>Jan-2001------1,234
>Feb-2001------2,345
>.
>.
>.
>(current month-year)----456
>
>you get the idea.
>I think a select sql would do the trick, but honestly can't figure out how.
>
>Thanks in advance for your time
>
>Ulises

Check the GROUP BY clause in the SELECT command. For instance:
select month, sum(amount) as amount;
  from DetailTable;
  group by month;
  into cursor result
browse
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform