Count how many rows have been updated in a BULK update statement
259178Nov 8 2006 — edited Nov 21 2006Dear all
I have a PL/SQL FORALL statement that I use to bulk update a column in a table. The statement is like this
FORALL x IN 1..<array>.counter
UPDATE mytable
SET mycolumn = 'Y'
WHERE join_col1 = <array>.<column>(x);
mycounter := mycounter + SQL%ROWCOUNT;
The problem here is that SQL%ROWCOUNT counts the iterations within the FORALL loop and not how many rows are finally updated due to the join condition..
Any ideas ?