Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Total the qty
Message
 
 
To
23/07/2009 17:39:58
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01414084
Message ID:
01414108
Views:
60
Something like
SELECT * FROM myorder WHERE .F. INTO CURSOR crsOrders READWRITE
append from "order.txt" sdf
INSERT INTO myorder 
  SELECT StockId , SUM(Qty)
    GROUP BY StockId  
>I receive the order in text file:
>
>
>3001     10
>3002      5
>3001      6
>3002      4
>
>
>I append them to the table:
>
>
>use myorder
>append from "order.txt" sdf
>
>
>then I get:
>
>
>StockId  Qty
>------- ----
>3001     10
>3002      5
>3001      6
>3002      4
>
>
>while I wish the same StockId will be total together:
>
>
>StockId  Qty
>------- ----
>3001     16
>3002      9
>
>
>is there any easy way to do it?
>
>thanks for the help
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform