[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Manipulating Aggregate Function Values



                -----Original Message-----
                From:   Daniel F. Dugal
[mailto:daniel.dugal@RUPPMAN.COM]
                Sent:   Tuesday, August 25, 1998 5:29 PM
                To:     Multiple recipients of list SQR-USERS
                Subject:        Re: Manipulating Aggregate Function
Values

                Thank you
                Marc Bergeron


                Try something like this:
                Begin-Select
                SUM(column) &sumnumber
                        LET #negative_sumnumber = (&sumnumber * -1)
                FROM table
                End-Select

                And
                Begin-Select
                COUNT(*) &Tablerows     (1,1)           !You can print
it this way...
                   PRINT &Tablerows     (2,1)           ! OR this way
                FROM table
                End-Select

                Hope this helps.

                Daniel F. Dugal Jr.
                Reporting/OLAP Solutions Developer
                Ruppman Marketing Technologies, Inc.  Soon to be: AFFINA
- The Customer Relationship Company (309) 679-4360 ph.
                (309) 679-4496 fax
                daniel.dugal@ruppman.com
<mailto:daniel.dugal@ruppman.com>

                > ----------
                        > From: Bergeron, Marc,
Herndon[SMTP:BergeronM@ALPA.ORG] <mailto:[SMTP:BergeronM@ALPA.ORG]>
                        > Reply To:     SQR-USERS@USA.NET
<mailto:SQR-USERS@USA.NET>
                        > Sent: Tuesday, August 25, 1998 3:42 PM
                        > To:   Multiple recipients of list SQR-USERS
                        > Subject:      Manipulating Aggregate Function
Values
                        >
                        > It's great to be able to use Aggregate
functions (MAX, SUM,
                        > COUNT(*).....) in SQR but how does one
multiply the resulting SUM() by
                        > -1 or PRINT COUNT(*).
                        >