Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL proc and select statement
see CREATE FUNCTION - may by this will do
if not , try to use OUT procedure parameters
if you expect (not from dual!) multiple rows result you can obtain it from oracle procedure using packages but i forget can't remember the details at the moment.
Alex Rivlin wrote:
> I have a select statement that I execute from the OCI -based client.
> Rather then building "select * from dual" (real select is lot more
> complex than that - about 30 lines )
> in the client, I'd like to put it in procedure and call the procedure
> from the client. That will allow me to change logic in select without
> updating client programs.
> How can I create a procedure for that? If I can not, what would be an
> alternative?
> In sybase or MSSQL I could do the following:
> create proc A_Proc as select * from dual;
> In oracle I get an error: "INTO is required for this select statement"
> What would be the way to do it in Oracle?
>
> Alex
Received on Wed Nov 17 1999 - 05:00:34 CST