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: <cary_at_nams.net>
Date: Fri, 13 Nov 1998 15:02:42 GMT
Message-ID: <72hhmj$6op$1@nnrp1.dejanews.com>


Hi,

     Is the procedure given below exactly like the one you tried to compile? In particular, does the SELECT statement contain an INTO portion? I'm no PL/SQL expert, but it is my understanding that PL/SQL SELECTs must put column information INTO variables. Moreover, I'm not sure that you can SELECT * in PL/SQL, but if this is legal, the returned columns are probably in the default ordering of the table layout. Perhaps somebody else can comment on this????

Cary

In article <72frdd$n0b$1_at_excalibur.flash.net>,   "Brent Moonen" <brentm_at_flash.net> 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
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Nov 13 1998 - 09:02:42 CST

Original text of this message

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