Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trouble passing exception
mike wrote:
> 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
When it meets the criteria of a function ... for example, returns a single value.
There is quite a bit on this at tahiti.oracle.com.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Mon Mar 28 2005 - 18:31:33 CST