Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Skip
Message
 
 
À
05/09/2004 14:15:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Skip
Divers
Thread ID:
00939590
Message ID:
00939593
Vues:
10
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform