Actually I used both and it seems to be fine now.
select field1,field2,field3,field4,cnt(*) as rec_num ;
where .... ;
order by 1,2,3,4 ;
group by 1,2,3
Works like a champ
>>>Hi all,
>>>TIA
>>Perry,
>>Sounds like a SQL counting by grouping :select Field1, Field2, Field3, cnt(*) ;
>> from mytable ;
>> group by 1,2,3 ;
>> into array myarray && into cursor myCursor more parctical ?Cetin
>
>Don't you need to precede the group by with the order by? Otherwise the un-ordered results will be inaccurate.
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.