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 -> Re: Return result set from stored procedure, possible ?

Re: Return result set from stored procedure, possible ?

From: Barbara Kennedy <barbken_at_teleport.com>
Date: Sat, 21 Oct 2000 01:56:28 -0700
Message-ID: <7ScI5.16556$cO4.448254@nntp3.onemain.com>

I am not sure why you think it is more portable or easier to maintain by using a stored procedure to just hide:
select ... from ...

Properly written code would use host variables etc. which will get you speed. I have seen people write code to make table abstractions so one doesn't have to write SQL, but you just end up specifying your set stuff in a different way.
Jim

"Gunnar Bjørgum" <gunnar.bjorgum_at_telenor.com> wrote in message news:MPG.145a7675e9f7d09896da_at_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 Sat Oct 21 2000 - 03:56:28 CDT

Original text of this message

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