Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> a pl/sql question

a pl/sql question

From: Freeman, Donald <dofreeman_at_state.pa.us>
Date: Fri, 30 Apr 2004 10:16:07 -0400
Message-ID: <AFF54B073FF15849B53E32E67EE860760144EE81@ENHBGPRI11.PA.LCL>

PINE-DFREEMAN> BEGIN
  2 UPDATE emp
  3 SET saL =3D100
  4 WHERE ename =3D 'POKEY';
  5 IF SQL%NOTFOUND THEN
  6 dbms_output.put_line('POKEY NOT FOUND');   7 END IF;
  8 END;
  9 /

POKEY NOT FOUND
PL/SQL procedure successfully completed.

I got the method from Scott Urman's Oracle 8i Advanced PL/SQL = Programming Book page 5. I am by no
means the world's best PL/SQL programmer, or even the best within 100 = feet of where I am sitting <g>
but this particular event can be handled without an exception.

> -----Original Message-----
> From: oracle-l-bounce_at_freelists.org
> [mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Anu
> Sent: Thursday, April 29, 2004 5:58 PM
> To: oracle-l_at_freelists.org
> Subject: RE: a pl/sql question

>=20
>=20

> I think you need exception here. It will error out if no row=20
> found. It will not go to :
> =20
> IF SQL%NOTFOUND THEN.=20


Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
Received on Fri Apr 30 2004 - 09:13:18 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US