Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong with my Group By
Message
From
14/04/2005 12:51:57
John Baird
Coatesville, Pennsylvania, United States
 
 
To
14/04/2005 12:41:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
SAMBA Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01004733
Message ID:
01004736
Views:
18
Don't you need to include margin in your group by?

>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform