Lisa,
This is what I found from the Oracle Documentation.
%ROWCOUNT yields the number of rows affected by an
INSERT, UPDATE, or DELETE statement, or returned by a
SELECT INTO statement. %ROWCOUNT yields 0 if an
INSERT, UPDATE, or DELETE statement affected no rows,
or a SELECT INTO statement returned no rows.
After looking at the details that u have posted in
this email, Oracle is doing it right and I do not
find implicit cursor attribute values getting
screwed or showing wrong values...
Regards
Rajagopal Venkataramany
- "Koivu, Lisa" <lkoivu_at_qode.com> wrote:
> Hello all,
>
> One of the developers here is having trouble using
> this cursor attribute.
> He swears up and down the statement is correct and
> should be updating rows.
> I tried to recreate his problem and wasn't able to.
> Below is an example of
> the type of code I'm referencing.
>
> Has anyone ever seen the implicit cursor attributes
> screw up and return
> wrong values? I don't believe I ever have.
> Any responses are appreciated.
>
> Thanks
>
> SQL> l
> 1 declare
> 2 ln_rowcount NUMBER;
> 3 ln_dummy DATE;
> 4 BEGIN
> 5 UPDATE BIN_LIST
> 6 SET LAST_MOD_TMSTMP = SYSDATE;
> 7 LN_ROWCOUNT := SQL%ROWCOUNT;
> 8 DBMS_OUTPUT.PUT_LINE(ln_rowcount);
> 9 COMMIT;
> 10 LN_ROWCOUNT := SQL%ROWCOUNT;
> 11 DBMS_OUTPUT.PUT_LINE(ln_rowcount);
> 12
> 13 select sysdate into ln_dummy from dual;
> 14 LN_ROWCOUNT := SQL%ROWCOUNT;
> 15 DBMS_OUTPUT.PUT_LINE(ln_rowcount);
> 16
> 17
> 18* END;
> SQL> /
> 3062
> 3062
> 1
>
> PL/SQL procedure successfully completed.
>
> SQL>
>
> Lisa Rutland Koivu
> Oracle Database Administrator
> Qode.com
> 4850 North State Road 7
> Suite G104
> Fort Lauderdale, FL 33319
>
> V: 954.484.3191, x174
> F: 954.484.2933
> C: 954.658.5849
> http://www.qode.com
>
> "The information contained herein does not express
> the opinion or position
> of Qode.com and cannot be attributed to or made
> binding upon Qode.com."
>
>
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
Received on Tue Dec 19 2000 - 10:50:23 CST