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: Stored Procedure Question

Re: Stored Procedure Question

From: Diego Pafumi <dpafumi_at_us.oracle.com>
Date: Thu, 12 Nov 1998 17:02:22 -0800
Message-ID: <364B851E.A822DC31@us.oracle.com>


First I think you need to have rights to create procedures and run it. Then as soon as yo create the procedure, if you receive the message 'warning.....' then write the command SHOW ERRORS or SHOW_ERRORS. To see why you receive that message.

Brent Moonen wrote:

> When I try to create the procedure I get a "Warning: Procedure created with
> compilation errors".
>
> If I the try to execute the procedure (using my example below) using EXECUTE
> TEST(55); (in SQL*PLUS) I get:
>
> begin TEST(55);end;
>
> *
> ERROR at line 1:
> ORA-06550: line 1, column 7:
> PLS-00905: object <owner>.TEST is invalid
> ORA-06550: line 1, column 7:
> PL/SQL: Statement Ignored
>
> Any help would be appreciated. Thanks.
>
> Diego Pafumi wrote in message <364B7245.FD1BF97C_at_us.oracle.com>...
> >Which kind of error do you get ?????
> >
> >Brent Moonen wrote:
> >
> >> I am new to Oracle (version 7.3.3) and I am having difficulty creating a
> >> stored procedure. I want to be able to pass a value into this procedure
> and
> >> have it run a simple select statement using the value passed in the where
> >> clause. I believe this is possible in SQL Server, so I figured it would
> be
> >> possible in Oracle. I have not been able to do this and the Oracle
> >> documentation only gives examples using action queries (I have had
> success
> >> using Inserts, Updates, & Deletes in Procedure). This is my statement:
> >>
> >> CREATE PROCEDURE TEST (xyz IN number)
> >> AS
> >> BEGIN
> >> SELECT * FROM SomeTable
> >> WHERE SomeField = xyz;
> >> END;
> >> /
> >>
> >> This results in a compiliation error. Is this sort of thing possible or
> >> not? I thought of trying to use function, but I believe that it will
> only
> >> return one value rather than all the fields in the table. I'll be
> calling
> >> this procedure from VB using ADO. Any help would be greatly appreciated.
> >> Thanks in advance.
> >>
> >> Brent Moonen
> >
Received on Thu Nov 12 1998 - 19:02:22 CST

Original text of this message

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