Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Suggestion

Suggestion

From: Frank <franjoe_at_frisurf.no>
Date: Thu, 8 Mar 2001 08:00:16 +0100
Message-ID: <zaGp6.1356$tR1.17922@news1.oke.nextra.no>

Hi!

You could try to make a plsql function that is callable from SQL-SELECT (that is probably the easiest).
Another try is somekind of inline view(or view). I have made a try here, it is 100% _untested_,
and I'm not sure if it will lead to any help for you :-) but it might be something to work on.

SELECT salgrade_o.grade,SUM(salgrade_o.losal) sales, accum.accum_sum FROM

               (
                    SELECT SUM (salgrade_i.losal)  accum_sum,
salgrade_i.grade
                    FROM salgrade salgrade_i
                    WHERE salgrade_i.grade<=salgrade_o.grade
                    GROUP BY salgrade_i.grade
                ) accum,
                salgrade salgrade_o

WHERE salgrade_o.grade=salgrade_i.grade
GROUP BY b.grade, accum.accum_sum
/

Frank Received on Thu Mar 08 2001 - 01:00:16 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US