Shouldn't do this stuff on Sunday mornings. It's not legal to combine SQL aggregate functions with field modifiers! The statement should, of course (!), read: SELECT BREAK ON PRODUCT, TOTAL PRICE, CALC EVAL "TOTAL(1)" FMT '4R', PCT '1' PRICE FROM ORDERS ORDER BY PRODUCT SUPPRESS DETAIL;
----- Original Message ----- From: "Ray Wurlod" <[EMAIL PROTECTED]> Date: Sun, 19 Sep 2004 08:53:53 +1000 To: [EMAIL PROTECTED] Subject: Re: [U2] Any SQL experts???? - HHHHEEEEELLLLPPPP > 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 ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
