Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Small .prg slows network
Message
From
14/11/1997 15:29:19
 
 
To
14/11/1997 15:16:13
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00060184
Message ID:
00060327
Views:
35
>>>>
>>>>Larry- I think what you are trying to do can be accomplished with one statement:
>>>>
>>>>SELECT count(*), distinct *;
>>>>FROM masterfile;
>>>>INTO CURSOR countfile;
>>>>WHERE inactive <> "Y";
>>>>GROUP BY agegrp, district
>>>>
>>>>This doesn't directly apply to your question, but could possibly reduce the time it takes to create your countfile table.
>>>
>>>But the index is agegrp+district. Grouping this way works in the same way as that index would?
>>
>>It looks like the only reason to index on agegrp+district is to assure no dupes, and to group the count. A duplicate (in this case) would be defined as two records with the same age group and the same district. Grouping by these values assures that there is only one for each, and serves the same purpose.
>>
>>Ken- an ORDER BY clause would work in addition to, but not instead of the GROUP BY.
>
>Select distinct cDistrict, cAgeGrp ;
>From masterfile ;
>Into cursor tmp ;
>WHERE inactive <> "Y"
>
>nTotal=_TALLY

I thought that he wanted counts for each age group. Maybe I misunderstood...
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform