Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL vfp 8 vs. vfp 6
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00815861
Message ID:
00816511
Vues:
19
Sergey, to make it more meaningful perhaps I would do this....
select detail,noun,sum(price),sum(quantity) from s:bsyear01 group by detail;
into cursor curs_abc
INDEX On noun TO e:f
copy to curs_xyz
brow
I see what you mean that the noun would be meaningless because only 1 record(noun) would show up for all records matching a certain detail.




>>That's kinda of discouraging(and confusing). I am supposed to think my sql select statements possibly returned incorrect data in vfp7?
>
>Lets take a look at your query
Select detail, noun, sum(price), sum(quantity) ;
>  from bsyear03 group by detail
There's nothing in the query that tells VFP from which record to take value for 'noun' column. The query is ambiguous. It's not documented but known that VFP will return value for the columns not icluded in GROUP BY clause from the last physical record in the group. It may or may not be what you want or expect. Even more, the result of the query depends on the physical order of data in the table. If you rearange physical order of data in the table the result returned by this query will also changed.
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform