Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL error from VFP6 to VFP9
Message
De
05/04/2005 08:38:00
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01000858
Message ID:
01001451
Vues:
12
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform