Check out the UniQuery HELP on the following topics. CALC evaluates expressions using TOTAL() function at breakpoints TOTAL() function keeps running totals EVAL "on the fly" virtual columns PCT n UniQuery keyword to report percentage (to n decimal places) ENUM
What you're after can be done in UniQuery, and can be done in UniVerse SQL. Alas, I don't know UniData SQL so can't comment authoritatively, but I would think it's worth exploring. In UniQuery you can, for example list ORDERS BY PRODUCT BREAK.ON PRODUCT TOTAL PRICE ENUM PRICE PCT 1 PRICE In UniVerse SQL the same keywords can be used SELECT BREAK ON PRODUCT, SUM(PRICE), COUNT(PRICE), PCT 1 PRICE FROM ORDERS ORDER BY PRODUCT; HTH ----- Original Message ----- From: "David Cason" <[EMAIL PROTECTED]> Date: Wed, 15 Sep 2004 10:53:20 -0500 To: <[EMAIL PROTECTED]> Subject: [U2] Any SQL experts???? - HHHHEEEEELLLLPPPP > This series of UniData SQL commands gives me the result below.How can I > get the percent change calculations included in the report total? > > EXECUTESQL 'CLEAR BREAK;' > EXECUTESQL 'CLEAR COMPUTE;' > EXECUTESQL 'BREAK ON grpType SKIP 1 ON REPORT SKIP 1;' > EXECUTESQL 'COMPUTE SUM OF exAmt exs1Amt scratchAmt prelimPremAmt > aexs1RaAmt ON REPORT;' > EXECUTESQL 'COMPUTE SUM OF renAvailAmt aexs1RenewedAmt amtRenewed > ON REPORT;' > CMD = 'SELECT grpType, exAmt, exs1Amt, scratchAmt, ' > CMD := 'pc_s_exs1, ' > CMD := 'pc_exs1_ex, ' > CMD := 'pc_s_exs1_ex, ' > CMD := 'pc_s_ex ' > CMD := 'FROM SummaryTable ' > CMD := 'WHERE exAmt != 0 OR exs1Amt != 0 OR scratchAmt != 0 ' > CMD := 'ORDER BY grpType; ' > EXECUTESQL CMD > > > > (1-0/0) > > Change (3-1/0) > (3-0/0) > (3-1/1) in Change > Change > Change Premium in > in > (0) (1) (3) in Rate Step Premium > Premium > GRPTYP EX EXS SCRATCH Scratch Only No Step > Combine > ---------- ---------- ---------- ---------- ------- ------- ------- > ------- > 1-GROUP 7,304,795 7,732,284 8,019,334 3.71 5.85 3.93 > 9.78 > > > 2-INDIV 4,918,394 5,166,476 5,522,687 6.89 5.04 7.24 > 12.29 > > > 3-DENTIST 153,251 153,926 177,131 15.08 0.44 15.14 > 15.58 > > > 4-OTHER 254,611 255,220 249,792 -2.13 0.24 -2.13 > -1.89 > > > ---------- ---------- ---------- > > 12,631,051 13,307,906 13,968,944 ????? ???? ????? > ????? > > > > > > > David Cason > Programmer Analyst > American Physicians Management Consulting > 1301 South Capital of Texas Highway, Suite C-300 > Austin, TX. 78746 > Office: (512)314-4345 Fax:(512)314-4398 > Toll Free: (800)252-3628 > email: [EMAIL PROTECTED] > > [demime 1.01d removed an attachment of type image/gif which had a name of > Pinstripe.gif] > ------- > u2-users mailing list > [EMAIL PROTECTED] > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
