Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP 8.0 - Select - SQL
Message
From
18/07/2003 10:13:51
 
 
To
18/07/2003 10:03:50
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00811460
Message ID:
00811484
Views:
12
>>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
Map
View

Click here to load this message in the networking platform