Information générale
Catégorie:
Codage, syntaxe et commandes
Why do you think, that is something wrong here? You included additional fields, and if there are no duplicated records with the very same BatchId, Id, EntryDate, TranDate, and EntityId , then count should be 1.
>The only difference in these 2 selects is the GROUP BY clause.
>The first one was done in VFP 7 and returns records with a total
>count of all records in each batch as a value on the record.
>
>The second was redone in VFP8, to include the additional fields
>on the GROUP BY clause, yet now I seem to get a whole lot more
>records, but each CNT value is 1.
>
>Whats wrong here?
>
>
>SELECT Id, EntryDate, TranDate, BatchId, EntityId, Count(*) AS Cnt;
> FROM Resh;
> WHERE Resh.Status == " ";
> GROUP BY Resh.BatchId;
> ORDER BY Resh.BatchId;
> INTO CURSOR Temp1
>
>
>SELECT BatchId, Id, EntryDate, TranDate, EntityId, Count(*) AS Cnt ;
> FROM Resh ;
> WHERE Resh.Status == " " ;
> GROUP BY BatchId, Id, EntryDate, TranDate, EntityId ;
> ORDER BY Resh.BatchId ;
> INTO CURSOR Temp2
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement