Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECTing records which are NOT DISTINCT
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00095346
Message ID:
00095355
Vues:
21
>I need some help to figure out how I can find out which records are being "dropped" when I do a SELECT * DISTINCT. I did a search for this and came up with some suggestions but they don't seem to fit this situation. One of the suggestions was:
>
>
>SELECT COUNT(field1) AS NumberofDup, field2 FROM MyTable GROUP BY field1 INTO CURSOR tmp
>
>That'd be great, but I'm doing a
>
>SELECT * DISTINCT, not a distinct on only one field.

Using GROUP you will select the last record for each group. Using DISTINCT, there is no way to find out what record you get. However, if you know exactly what records you really want to retrieve then you can get workaround.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform