Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT - SQL question
Message
From
24/10/1997 12:16:53
 
 
To
24/10/1997 12:10:53
Shane Gilbert
Oklahoma State Department of Education
Norman, Oklahoma, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00056553
Message ID:
00056555
Views:
27
>I need to sum 2 fields within a table. THis table contains the following needed fields:
>
>claims.dbf
>CONO,INNO,LCH_TOT,SUPR_TOT
>
>The first 2 cono and inno combine(cono+'-'+inno) to make the agreement number. I need to SUM lch_tot, supr_tot, and lch_tot + spr_tot for each agreement number and then total the whole bunch. ANy suggestions? Also where can I found some good material to educate myself on SELECT-SQL?

SELECT cono + "-" + inno AS AgrNo, SUM(lch_tot) AS SumLch, SUM(supr_tot) AS SumSupr;
FROM Claims;
GROUP BY cono, inno

SUM SumLch + SumSupr TO lnGrandTotal
Previous
Reply
Map
View

Click here to load this message in the networking platform