Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group By
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01058465
Message ID:
01058467
Views:
7
>We are jumping from VFP 7 to 9. In running our appl to check for anomolies we are seeing issues with queries. Specifically GRoup By clauses.
>
>I thought I read somewhere that the Group By syntax changed from 7-8 to be morew T-SQL like to where all your columns except aggregates in the query must be in the Group By clause unlike before where you only put in specific colmns. Van someone briefly enlighten me?

That is right. Instead of:
SELECT field1,field2,max(field3) FROM Table1 GROUP BY field1
which was allowed, you need to put all your non-aggrgates in the GROUP BY, like:
SELECT field1,field2,max(field3) FROM Table1 GROUP BY field1,field2
VFP9 will show an error message when the GROUP BY is not complete. I must say I prefer that to the old situation.

Lennert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform