Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Total the qty
Message
 
 
À
23/07/2009 17:39:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
01414084
Message ID:
01414108
Vues:
59
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform