Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is wrong with my Group By
Message
De
14/04/2005 12:54:26
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
 
 
À
14/04/2005 12:41:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
SAMBA Server
Database:
Visual FoxPro
Divers
Thread ID:
01004733
Message ID:
01004739
Vues:
23
>What do I have wrong with my group by clause below? When I try this in VFP 8.0 I get the message “SQL: Group By clause is missing or invalid”.
>
>SELECT item,((SUM(price * qtyshp) - SUM(cost * qtyshp)) / SUM(price * qtyshp)) * 100 AS Margin;
> FROM Prodata!artran99 ;
>UNION ALL;
>SELECT item,((SUM(price * qtyshp) - SUM(cost * qtyshp)) / SUM(price * qtyshp)) * 100 AS Margin;
> FROM Prodata!arytrn99 ;
>group BY item ;
>into cursor tcCursor

Jeff,

I think the GROUP BY clause has to come before the UNION clause.

HTH,
Jim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform