Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: oracle procedure newbie
CREATE PROCEDURE DISPLAY_PRODUCT @PRODUCT_CODE VARCHAR(5)
AS
BEGIN
IF NOT EXITS(SELECT 1 FROM CIS269_PRODUCT WHERE
PRODUCT_CODE=@PRODUCT_CODE)
BEGINRAISEERROR('NO DATA FOUND.',16,1)
RETURN1
END
fitzjarrell_at_cox.net wrote:
> Bulldog wrote:
> > Hello,
> >
> > I am trying to write a procedure using oracle sql plus. Everytime I
> > run the create procedure command, I just get another sql line like its
> > not ending. Here is what I am trying to do, maybe that will help.
> >
> > Create a stored procedure with a single input parameter that allows the
> > user to supply a product code. Within the procedure, I want to execute
> > a SELECT that retrieves the description and price of the product from
> > the PRODUCT table with a code matching the one supplied by the user. I
> > also would like an exception section that traps the NO_DATA_FOUND error
> > and indicates to the user that the product code that he or she supplied
> > is invalid.
> >
> > Any assistance is appreciated!
>
> What, exactly, have you written in this 'create procedure' statement?
>
>
> David Fitzjarrell
Received on Mon Jul 03 2006 - 16:36:39 CDT
![]() |
![]() |