>>
>>Edgar,
>>I'm not sure I understood it. Would you get something like :
>>
>>0 = 30+55...
>>1 = 24+10... ?
>>
>
>Cetin
>
>0-1 would be the column, namely Values, that would identify the values I'm counting. I don't have that. Therefore, I need a way to create that column so I can identify each COUNT.
>In other words, if I had only one column I need to count, I would do
>
>SELECT fld1 AS values,COUNT(Fld1) total FROM nTable
>that would show:
>0....39
>1....40
>2....55
>3....90
>4....29
>5....4
>
>but like I said, I have 30+ fields that I need to do this.
>Let me know if I didnt explained mayself again
>thanks Celtin
Could be w/o SQL ?
create cursor Counts (f1 i, f2 i, f3 i)
create cursor myCursor (f1 i, f2 i, f3 i)
for ix=1 to 20
insert into myCursor values (int(rand()*6), int(rand()*6), int(rand()*6))
endfor
brow
dimension myArray[6,fcount()]
myArray=0
scan
for ix=1 to fcount()
myArray[eval(field(ix))+1,ix] = myArray[eval(field(ix))+1,ix]+1
endfor
endscan
select Counts
append from array myArray
brow
Cetin