Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting the Total in selected fields
Message
 
 
À
23/03/2003 21:58:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00769100
Message ID:
00769107
Vues:
19
select "s40" AS descript, SUM(s40) AS tot
UNION ALL ;
select "s20" AS descript, SUM(s20) AS tot ;
INTO CURSOR crsResult
>Hey Guys,
>
>Need help in my inventory program.
>
>The situation is like this:
>
>I have a table (TABLE 1) which contains fields (item (c), s40(n), s20(n)) how can I get the records in TABLE 1 particularly fields item and either of s40 or s20 which ever i selected then append all of them into lets say TABLE 2 and at the same time get total of either s40 or s20.
>
>example: (TABLE 1)
________________________________
>Item          s40           s20
>--------------------------------
>paper          3             2
>bottle         12            25
>_______________________________
>               15            27
>
>(TABLE 2)
>
>_______________________________
>s40          15
>-------------------------------
>s20          27
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform