myArray[i, 1] && To use Area Code i myArray[i, 2] && Team i myArray[i, 3] && Count iwere only intended to show how to access AreaCode, Team and Count for each occurrence, they should be part of an expression to be valid, like:
* Calculate the total lnTotal = 0 for i = 1 to alen(myArray, 1) lnTotal = lnTotal + myArray[i, 3] next i * Print percentajes if lnTotal > 0 ? 'Area Code', '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 endifWhat i am posting is not exaclty what you should use, it is just a pointer of how can you do it
>SET TALK OFF >SET ECHO OFF >SET SAFETY OFF >PUBLIC s >USE table1 >local myArray(1) >select areacode, team, count(*) from table1 group by areacode, team into array myArray > >for i = 1 to alen(myArray, 1) && Number of rows in the array > myArray[i, 1] && To use Area Code i > myArray[i, 2] && Team i > myArray[i, 3] && Count i >next i > >>thanks.