Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trouble passing exception
mike (hillmw_at_charter.net) wrote:
(various snipped)
: I'm pretty new to pl/sql and having trouble passing exceptions between
: my sql and procedures.
: my procedures are:
: create or replace procedure update_me (
: x_param1 in varchar2,
: x_param2 in varchar2,
: ) AS
: begin
: UPDATE mytbl
: SET myfield2 =3D x_param2,
: WHERE myfield1 =3D x_param1;
: exception when no_data_found then
It is not an exception to update zero rows.
Lookup SQL%ROWCOUNT for a way to do what you want.
: raise_application_error(-20101=AD, 'No Data');
: end update_me;
-- This space not for rent.Received on Mon Mar 28 2005 - 18:02:32 CST
![]() |
![]() |