General information
Category:
Coding, syntax & commands
>>Have you tried? I get an error message.
>
>VFP8 doesn't allow a 'group by' clause that does not include all of the fields in the select. The only way to make it work that way is to Set EngineBehavior 70 to make it revert to the way VFP7 worked.
>
>About the only other thing you can do is to make any of the fields that are not to be included in the group by into aggregate fields.
>
>Alan
Alan --
And, since VFP 8 now conforms to the SQL standard, it's probably a good idea to follow your second strategy...
The aggregate expression MAX() around a non-grouped character field may seem a bit unusual, but it works just fine.
It's a good reminder that, in almost all cases, the fields "in limbo" -- without an aggregate function or included in the group by expression -- are "implementation dependent" -- and therefore, meaningless.
Jay
Previous
Next
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