Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Understanding the Group By Clause
Message
From
01/05/2003 17:00:24
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00783889
Message ID:
00783892
Views:
12
>We are currently converting to vfp 8.0 and i have been looking for an answer to this question all afternoon. I have read several articles and forum posts but am still rather clueless to the changes to the group by clause.
>
>Is the set enginebehaviour the only work around when you are summing fields in your sql statement?? As i have taken the group by clause out of a general statement, did a browse on it...got the column number i wanted to group on and then added the group by clause back into the sql statment. Can somebody explain this to me???

The new SQL engine is more up to date with ANSI SQL. So, yes, if you wish to keep your existing code as is, SET ENGINEBEHAVIOR will help. On my part, I converted all SQLs that was not ANSI SQL to fit it. So, by that, it allows me to keep up to date with the default SQL engine of Visual FoxPro.

I also enhanced the way I was working with those SQLs. In most cases now, I collect the keys. Then, I issue another SQL to get the rest of fields.

Yes, GROUP BY is the biggest issue. Basically, it has (it's syntax) to match the proper field naming of your SQL. Basically, within about an hour, you'll be able to get up to speed with all the related issues. You just need to test all of them, where mostly GROUP BY applies, in your code and you'll be ok. You can also follow some threads that occured in that month which pretty much covers all of the issues.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform