General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only