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!

DML Error Logging

colesgaJan 30 2009 — edited Jan 30 2009
Hi

I am using DML error logging on an insert. My issue is that when you do a SQL%ROWCOUNT after the insert statement it only has the count of the inserted records. Is there anyway to get the number of records that were inserted into the ERR$ table without doing a seperate sql statement to get the count?

The issue with trying to do a count on the ERR$ table is that this table will have multiple inserts going into it constantly so I really need to know the inserted value at the time of the insert into the good table.
insert into gary_coles.test
( col1
, col2
)
select	col1
,	col2
from	staging_schema.test
where	creation_date < p_to_date
log errors into staging_schema.err$_test reject limit unlimited;

v_move_count := SQL%ROWCOUNT;
I want to be able to see a count of all the records processed not just the inserted count.

Cheers
Gary
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2009
Added on Jan 30 2009
9 comments
1,635 views