Re: Can a stored procedure return rows?

From: Ken Ingram <kingram_at_interramp.com>
Date: 1996/03/07
Message-ID: <4hlf86$hkd_at_usenet2.interramp.com>#1/1


I'll check my books tomorrow but I don't think you can pass a whole record back to the calling appl. You can define parameters as IN, OUT or INOUT and pass data back that way.
Procedure do_something(x IN number, y OUT char, z OUT number) is

/* declare local variables */
local_var number;

begin

local_var := x + 2;
z := local_var / x;
y := 'Character string test';

end;

/* 	x is read in 
	y and z are passed out   */

An alternative is to write the output to a table which could be read by the calling application. Hope this helps.

Ken Ingram
Metasys Inc.
kingram_at_metasys.com

In article <313DCCEE.76B8_at_mmacmail.jccbi.gov>, Russell_Foster_at_mmacmail.jccbi.gov says...
>
>Forgive the basic guestion....
>
>
>Can a stored procedure in Oracle 7.1 NT return a result set?
>
>I have used MS-SQL Server where a stored procedure can contain a select
>statement that can take parameters (much like a stored query in
>MS-Access).
>
>I have tried to create the same type of procedure in Oracle and it says I
>must use a cursor to have a select. Ok, but how to get the result set
>back to the calling application?
>
>Thanks for clearing this up for me.
Received on Thu Mar 07 1996 - 00:00:00 CET

Original text of this message