COMPUTE SUM CALCULATIONS!!! URGENT

From: MC <massimo.corradi_at_iconeurope.com>
Date: Wed, 08 Mar 2000 08:37:29 -0800
Message-ID: <0047c5c4.770ea000_at_usw-ex0109-070.remarq.com>



I have this report:
break on "Soc" skip 1 on "Zona" skip page
compute sum of "Periodo 1" on "Soc"
compute sum of "Periodo 2" on "Soc"
compute sum of "Periodo 1" on "Zona"
compute sum of "Periodo 2" on "Zona"

select

    ' '    "Soc",
    zon0af "Zona",
    AGN0AF "Agente",
    cat0af "Cat",

    CLIENTE "Cliente",
    rgs0af "Ragione Sociale",
 SUM(Periodo1) "Periodo 1",
 SUM(Periodo2) "Periodo 2",
 DECODE(SIGN(SUM(Periodo1)), 1, (
(SUM(Periodo2)-SUM(Periodo1)) / SUM(Periodo1) ) * 100, 100)
"% Incremento"
from
 anag0af, SLHS09
where
soc0af     = 'IC'
and soc0af = SOC
and cod0af = CLIENTE
and tcn0af = 'C'

group by
 AGN0AF,
    zon0af,
    cat0af,
    CLIENTE ,
    rgs0af
order by
 AGN0AF,
    zon0af,
    cat0af,
    CLIENTE ,
    rgs0af;

HOW CAN I APPLY THE CALCULATION:
(SUM(Periodo2)-SUM(Periodo1)) / SUM(Periodo1) ) * 100, 100)
TO THE TOTALS OBTAINED WITH THE compute sum OPTIONS?

  • Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
Received on Wed Mar 08 2000 - 17:37:29 CET

Original text of this message