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

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Newbie: Porting the SUSPEND statement from other RDBMS's to Oracle

PL/SQL Newbie: Porting the SUSPEND statement from other RDBMS's to Oracle

From: <slf_at_compulink.gr>
Date: Sun, 14 Feb 1999 21:00:12 +0200
Message-ID: <36C71D3B.5D37A900@compulink.gr>


In several RDBMS's there is a SUSPEND statement that suspends execution of a select stored proc, passes control to the caller along with the values of the
OUT parameters, and resumes execution of the sp with the next fetch.

For example:

CREATE PROCEDURE test
RETURNS (retval INTEGER) <-------- the OUT parameter as defined in Interbase
AS
BEGIN
FOR SELECT aFIELD FROM aTABLE
INTO :retval
DO
  BEGIN
    SUSPEND; <--------- here the control is passed to the caller statement

                           along with the value of the :retval
parameter.
  END;
END; When I do a
SELECT * FROM test
in effect I get all the aFIELDs of aTABLE.

How can I do this in PL/SQL? Received on Sun Feb 14 1999 - 13:00:12 CST

Original text of this message

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