Re: Question on How to call a Select stmt in a Stored Procedure?

From: Bill Ford <wwford_at_ingr.com>
Date: 12 Sep 1994 18:21:22 GMT
Message-ID: <352672$ddm_at_b23a.b23a.ingr.com>


In article <34qagn$ov4_at_bmerha64.bnr.ca>, Jason Lisenchuk <hris_at_nt.com> says:
>
>Question on How to call a Select stmt in a Stored Procedure ?
>
>Please keep in mind that Oracle 7.0.x stored procedures cannot return a
>cursor; instead return a scalar value (like NUMBER or VARCHAR or LONG).
>If the SELECT contained within the procedure retrieves a small amount of
>data, you could consider packing this into a LONG (with appropriate
>delimiters) and parsing via C at the client. Alternatively, you could
>use the SELECT to summarize data and INSERT it into another table, which
>you SELECT and FETCH via C at the client.

This is a situation that has been plaguing me as well. Even though I wouldn't consider using a stored procedure for security on a select instead of using a VIEW or something else, this is what a customer wants.

Now, in Sybase Open Client, I can execute a stored procedure that does a select from my (written in C) client, and then in the client access the results. As you have mentioned, and as I've painfully discovered, there is no way for me to do something like this in embedded Oracle.

Other than your two suggestions (pack and return the results, or use a temporary table) can ANYONE think of a way to do execute a select-stored procedure from a client program?

wwford_at_ingr.com Received on Mon Sep 12 1994 - 20:21:22 CEST

Original text of this message