Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Stored Procedures
Try this. And I'm not even a Oracle person. I call GetEquipmentLike from
Delphi, and it returns the expected resultset. Works for me, SQL gods help
you.
create or replace package pkgGlobal as
TYPE CURSOR_TYPE IS REF CURSOR;
end pkgGlobal;
create or replace procedure GetEquipmentLike
(sEqnum equipment.eqnum%type, oCursor IN OUT pkgGlobal.CURSOR_TYPE ) AS
begin
open oCursor for Select * from equipment where eqnum like sEqnum;
end;
Marvin <marteaga76_at_my-deja.com> wrote in message
news:7tiufb$7s9$1_at_nnrp1.deja.com...
> In ORACLE can a stored procedure be created such that
> it returns a query. That is, basically instead of a stored procedure
> that does INSERTS, UPDATES or DELETES , What I want is really a stored
> query, a SELECT with a really ugly WHERE caluse that I can pass
> parameters into. What I don't know is how to get a hold of a query
> result and pass it back to the caller. Is a stored function that
> returns a cursor a possibility? Even then how do I throw the cursor
> back to the issuer of the query?
>
> Help me SQL gods, your my only hope
>
> --
> Marvin
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Fri Oct 08 1999 - 00:44:34 CDT
![]() |
![]() |