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: HELP returning rows from stored proc

Re: HELP returning rows from stored proc

From: Ari Kaplan <akaplan_at_interaccess.com>
Date: 1997/07/16
Message-ID: <5qj7lg$3d0@nntp.interaccess.com>#1/1

Marvin Frederickson (mfrederickson_at_kpmg.com) wrote:
: I'm trying to write a stored procedure to return rows, but not having
: any luck.
: In SQL Server, the rows from the last SELECT stmt in the stored proc is
: returned as data from the stored procedure. How do I do this in Oracle?
:
: Thanks.
: mfrederickson_at_kpmg.com

Marvin,

You will need to do two things. First, start the serveroutput:

ALTER SYSTEM SET SERVEROUTPUT ON SIZE 100k;

This will display the output buffer of stored procedures up to 100k. You can change the 100k to suit your needs.

Next, in the stored procedure, use the DBMS_OUTPUT command:

DMBS_OUTPUT.PUT_LINE('The row is ...'||column_a||', '||column_b|| ... );

Note that no output will occur until the stored procedure has completed.

-Ari Kaplan
Independent Oracle DBA Consultant

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 80+ Oracle tips, visit my Web Page:                       <->
<->                                                               <->
<->              http://homepage.interaccess.com/~akaplan         <->
<->                                                               <->
<->             email: akaplan_at_interaccess.com                    <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
Received on Wed Jul 16 1997 - 00:00:00 CDT

Original text of this message

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