Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: stored procedures in oracle

Re: stored procedures in oracle

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 29 Dec 2000 22:24:11 +0100
Message-ID: <92k5mn$6tit7$4@ID-62141.news.dfncis.de>

This is the most frequently asked question by people exposed to sqlserver and it has been really answered *numerous* times. You need to use a REF CURSOR as in out parameter to your procedure. Refer to the Oracle PL/SQL documentation on that topic to the book on Pl/SQL by Steven Feuerstein or to http://osi.oracle.com/~tkyte subject Resultsets.

Regards,

Sybrand Bakker, Oracle DBA

<emmet_rc_at_yahoo.com> wrote in message
news:92irko$jin$1_at_localhost.localdomain...
> Can you give an example of the proper syntax (or point out the errors in
> the code below). I'm trying to return a multi-row resultset to an
> application that should be able to handle any ODBC data source. My tests
> with MS SQL are working. The stored procedure code in that case is
> create procedure TestSP
> as
> Select * From TestTable
>
> I'm using the schema manager to create/edit the oracle stored procedures.
> The code for my SP (which compiles in the schema manager, but does not
> provide a usable resultset to my application) is
> Create Procedure TestSP
> as
> CURSOR ResSet IS
> SELECT * FROM TestTable;
> begin
> OPEN ResSet;
> end;
>
> I've also tried create an Oracle function, also using schema manager, but
> could not get one to compile.
>
> Any help would be greatly appreciated.
> Thanks.
>
Received on Fri Dec 29 2000 - 15:24:11 CST

Original text of this message

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