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

Home -> Community -> Usenet -> c.d.o.tools -> Return result set from stored procedure, possible ?

Return result set from stored procedure, possible ?

From: Gunnar Bjørgum <gunnar.bjorgum_at_telenor.com>
Date: Fri, 20 Oct 2000 16:34:48 +0200
Message-ID: <MPG.145a7675e9f7d09896da@134.47.108.15>

Hello

This is propably a FAQ, but since I couldn't find it there, I ask here.

Is it possible to let stored procedures return a result set? I have used sybase earlier, and it works there...

something like:

CREATE PROCEDURE SEL_ALL AS
BEGIN
        SELECT COL_A, COL_B, COL_C FROM TABLE_A; END;
/

so that when you call it, it would be just like running the SELECT directly.

When I tried, I got compilation errors, and Oracle wanted me to select INTO some variable...

The purpose is to avoid embedding SELECT statements in external programs, and keep the SELECTs inside Oracle, so they can be easily changed...

What do you suggest ?

Regards

-- 
Gunnar Bjørgum
gunnar.bjorgum_at_telenor.com
Norway
Received on Fri Oct 20 2000 - 09:34:48 CDT

Original text of this message

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