Message-Id: <10714.124892@fatcity.com> From: Praveen Sahni Date: Tue, 19 Dec 2000 08:00:49 +0400 Subject: RE: SQL%ROWCOUNT with update statement This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C06970.4589DB50 Content-Type: text/plain; charset="iso-8859-1" Hi, Its working fine what is the problem ............ Praveen -----Original Message----- From: Koivu, Lisa [mailto:lkoivu@qode.com] Sent: 18 December 2000 23:41 To: Multiple recipients of list ORACLE-L Subject: SQL%ROWCOUNT with update statement 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." ------_=_NextPart_001_01C06970.4589DB50 Content-Type: text/html; charset="iso-8859-1" SQL%ROWCOUNT with update statement
Hi,
 
Its working fine what is the problem ............
 
Praveen
-----Original Message-----
From: Koivu, Lisa [mailto:lkoivu@qode.com]
Sent: 18 December 2000 23:41
To: Multiple recipients of list ORACLE-L
Subject: SQL%ROWCOUNT with update statement

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