Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECTing records which are NOT DISTINCT
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00095346
Message ID:
00095355
Views:
20
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform