Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cool way to eliminate duplicate column values?
Message
From
07/04/2001 19:12:37
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
 
 
To
07/04/2001 14:05:52
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00493142
Message ID:
00493289
Views:
13
This is a non-standard implementation of SQL that VFP does. It may change in the future.

You might also look at the UNIQUE index - it shows only the first value when there are more than one. It's really very misleading and I don't like it, but it might give you what you need.




>This works because (apparently) GROUP BY selectitem returns the row of the last selectitem it finds in the source set as the representative row of the group....(makes sense if you're summing, averaging, etc). However, though it stands to reason that GROUP BY should work this way by definition, I do not know if that is a fact ... or it is just the way my version of VFP implements it.
>
>The reason for using two selects is because the selection of the group row apparently occurs prior to ordering the result set.
>
>If anyone can give further information about whether this method is risky or not I'd appreciate it.
Previous
Reply
Map
View

Click here to load this message in the networking platform