Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Add rows to query result?

674950Dec 10 2008 — edited Dec 11 2008
Is it possible to add rows to a SQL query's result, similar to the COMPUTE command in SQL*Plus?

That is, for example, when the value for column A changes, add a row after the previous row (the last one before column A changed) to show the sum of the values of column B.

e.g.

<PRE>A B
- --
1 3
1 4
1 5
12
2 9
2 -1
2 -7
1</PRE>
This post has been answered by Rob van Wijk on Dec 11 2008
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2009
Added on Dec 10 2008
5 comments
2,666 views