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: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 28 Mar 2005 16:31:33 -0800
Message-ID: <1112056083.260763@yasure>


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

Original text of this message

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