Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the Total in selected fields
Message
 
 
To
23/03/2003 21:58:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00769100
Message ID:
00769107
Views:
20
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform