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!

insert SQL%ROWCOUNT in table for logging

metalraySep 7 2015 — edited Sep 7 2015

Hi Experts,

I have a stored procedure for which I want to write into a log table the actual number of rows inserted for later auditing if needed.

Howeever,

var_year is a parameter

but the error is thrown at SQL%ROWCOUNT, saying the symbol is not recognized.

INSERT INTO T_LOG (var_Year, time,message) VALUES (year, SYSDATE, TO_CHAR(SQL%ROWCOUNT)||' xxxxx '||VAR_year||' inserted');

Any ideas?

This post has been answered by Stew Ashton on Sep 7 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2015
Added on Sep 7 2015
4 comments
6,877 views