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!

Calculate the total sum stored in a variable

user11164339Feb 18 2014 — edited Feb 20 2014


Hi All,

    I have a local variable in my pl/sql package.It will get assigned some value each time based upon the conditions in the loop.The value in the variable is not stored in any tables but just pulled in the output of the concurrent program for each record.Is there any way that i can total the sum of the variable from all the records and show in the output file .

Example:

Record       Variable Value

1                       20

2                       30

3                       40

4                       10

I want to show like the sum of the variable from all records is 100 but the variable value is not storing in any of the tables and i am printing in the concurrent output.Any ideas please.

Thanks,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 20 2014
Added on Feb 18 2014
9 comments
3,565 views