Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Group by clause is missing or invalid - but it is not!!
Message
 
To
14/07/2006 01:00:30
Ian Johnston
Computer Software Solutions
Woodland, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01136284
Message ID:
01136302
Views:
16
Ian, there is SET ENGINEBEHAVIOR 70 (check in help to see what are the engine changes) settings which allows you to use your old SELECTs. But my advise is, use this command temporay untill you go through all your selects and change them. After you change SELECTs remove this SET. If after a while you decide to switch to SQL Server or any other RDBMS your SELECTs will be ready.





>Yikes! I am moving a vfp7.0 app to 9.0, it use sum and group by in a lot of routines. Do you have to group by on all the columns ?
>
>
>
>>Yes, that SQL statement is invalid. You are grouping by one column, but VFP says it cannot make that grouping because it will not know which value of other columns to show if there is more than one value in a column which must be "collapsed" by the group by.
>>
>>For example, let's say you have 2 rows like this:
>>
>>row 1: Val1 = xx, val2 = yy
>>row 2: val1 = xx, val2 = zz
>>
>>Then you issue: select val1, val2 group by val1.
>>
>>If VFP tried to group rows 1 and 2, which value would it show for val2? It would not know which one to show; therefore, VFP declares the group by clause to be invalid.
>>
>>This behavior is by design ever since (I think) VFP 8.0.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform