SELECT BatchId, Id, EntryDate, TranDate, EntityId, Count(*) AS Cnt ; FROM Resh ; WHERE Resh.Status = SPACE(nn) ; GROUP BY BatchId, Id, EntryDate, TranDate, EntityId; ORDER BY Resh.BatchId ; INTO CURSOR Temp1>I have a table where each record belongs to a batch.
>USE d:\projects\testdata\smts\resh.DBF > >SELECT BatchId, Id, EntryDate, TranDate, EntityId, Count(*) AS Cnt ; > FROM Resh ; > WHERE NOT EMPTY(Resh.Status ; > GROUP BY BatchId, Id, EntryDate, TranDate, EntityId; > ORDER BY Resh.BatchId ; > INTO CURSOR Temp1 >>