Re: how do i COMPUTE (SQL*Plus) percent....

From: Alan <alanshein_at_erols.com>
Date: Wed, 23 May 2001 15:16:42 -0400
Message-ID: <9eh28c$ksj$1_at_bob.news.rcn.net>


Try adding

BREAK ON REPORT "Aparna" <bliss_is_ignorance_at_hotmail.com> wrote in message news:3b0bac0d.0_at_news2.tm.net.my...
> hi all,
>
> either i'm extremely stupid... or i'm overlooking something very basic
> (yeah... i know former seems more likely :-) )...
>
> i need to know how to compute percentage using SQL*Plus ... example...
>
> break on deptno skip 1
> compute sum of sal comm on deptno
>
> select deptno, ename, sal, comm, (100 * comm) / sal "percent"
> from emp
> order by deptno;
>
> the output i get is for example
>
> DEPTNO ENAME SAL COMM PERCENT
> ---------- ---------- ---------- ---------- ----------
> 30 ALLEN 1600 300 18.75
> BLAKE 2850 0 0
> MARTIN 1250 1400 112
> JAMES 950 0 0
> TURNER 1500 0 0
> WARD 1250 500 40
> ********** --------- ---------
> sum 9400 2200
>
>
> now i want i need to know is that the sum of comm is how much percent of
 the
> sum of sal... how do i get this figure along with the other *summary*
> figures??? any guesses how i can arrive at this?????
>
> thanks for ur attention...
>
> regards,
> aparna
>
>
>
>
>
>
Received on Wed May 23 2001 - 21:16:42 CEST

Original text of this message