John Baird
Coatesville, Pennsylvania, United States
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only