Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL error from VFP6 to VFP9
Message
From
05/04/2005 08:38:00
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01000858
Message ID:
01001451
Views:
11
>Sorry to see it change. That is one of the things I loved about VFP was it's SQL was flexible and easy to use. Oh well.
>

The problem is that when you have non-aggregated fields that aren't listed in the GROUP BY clause, you can get random results. VFP arbitrarily picks the data for the non-aggregated fields from the last record in the group, but there's nothing that makes that value correct.

In your example, it's probably not a big deal, but in some cases, you actually get wrong results.

In general, the changes that have been made to SELECT in the last few versions that make queries that previously worked fail are because those queries could return spurious results.

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform