Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Group by clause in vfp8
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00774269
Message ID:
00774300
Vues:
26
>>Hi to all:
>>I don't understand how to write the group by clause in vfp8, naming all the fields? why? It's a big job!
>>Anybody can give me an explanation?
>>Thanks
>
>Pedro,
>
>In 8.0, you can't do something like the following
SELECT sku, stockcolor, SUM(quantity);
>  FROM Products;
>  GROUP BY sku;
>  INTO CURSOR resultset
because the query involves an aggregate function (SUM) and the stockcolor field is not in the GROUP BY clause. In previous versions you could. The workaround is to issue SET ENGINEBEHAVIOR 70 immediately prior to issuing the query then SET ENGINEBEHAVIOR 80 afterwards.

George,
The workaround is to add the stockcolor field to the Group By clause, IMO. ;-)
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform