Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Skip
Message
 
 
To
05/09/2004 14:15:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Re: Skip
Miscellaneous
Thread ID:
00939590
Message ID:
00939593
Views:
11
You can get an area list into an array and than loop through it to process each area.
SELECT areacode, COUNT(*) ;
  FROM table1 ;
  GROUP BY 1 ;
  INTO ARRAY laAreas
* Process all areas
FOR lnAreInd = 1 TO ALEN(laAreas,1)
  lcArea = laAreas[lnAreInd,1]
  lnTotal = laAreas[lnAreInd,2]
...
ENDFOR
>
>i need your help to get 'next area' from mytable to make same operation,
>
>this is the code,
>
>SET TALK OFF
>SET ECHO OFF
>SET SAFETY OFF
>PUBLIC s
>USE table1
>m.vv=areacode && m.vv get area1
>local myArray(1)
>
>select areacode, team, count(*) from table1 group by areacode, team into array myArray;
>where areacode=m.vv
>
>*brow
>lnTotal = 0
>for i = 1 to alen(myArray, 1)
>  lnTotal = lnTotal + myArray[i, 3]
>next i
>
>if lnTotal > 0
>
>   ? 'areacode', '     ','Team', 'Count', 'Percentaje'
>   for i = 1 to alen(myArray, 1)
>     ? myArray[i, 1], myArray[i, 2], myArray[i, 3], myArray[i, 3] / lnTotal * 100
>
>
>    next i
>   && i need to skip to get area 2 etc....
>
>ENDIF
>
>
>thanks.
>m.qasem
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform