Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Computing cumulative values with SQLplus
I have a SQLplus statement:
select part,
qty
from part_list
where part like 'a%';
It produces output like:
part qty aa 2 ab 5 ac 1
What I want is to add a column showing the cumulative quantity, like
part qty cum aa 2 2 ab 5 7 ac 1 8
Any idea how this can be done, with Oracle 7.3 SQLplus? I know I can do it with PL/SQL but this is a second-best solution.
--
Alan Long
Materials Systems Group
Motorola, East Kilbride, Scotland
email tics28@"spam-off"email.sps.mot.com (remove the "spam-off")
Received on Mon Aug 03 1998 - 09:05:10 CDT
![]() |
![]() |