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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Trouble passing exception

Re: Trouble passing exception

From: mike <hillmw_at_charter.net>
Date: 28 Mar 2005 16:16:24 -0800
Message-ID: <1112055384.297678.173010@z14g2000cwz.googlegroups.com>


So.. if i changed my procedure to below do you think it would work?

create or replace procedure update_me (
x_param1 in varchar2,
x_param2 in varchar2,
) AS
begin
 UPDATE mytbl
  SET myfield2 = x_param2,
  WHERE myfield1 = x_param1;
  if SQL%ROWCOUNT = 0 then
    raise_application_error(-20101, 'No Data');   end if;
end update_me;

BTW, when should I create a function versus a procedure?

Mike Received on Mon Mar 28 2005 - 18:16:24 CST

Original text of this message

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