Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00893303
Message ID:
00893307
Vues:
14
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
Fil
Voir

Click here to load this message in the networking platform