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 -> Curious problem iterating through a ref cursor (recordset)

Curious problem iterating through a ref cursor (recordset)

From: Paul Tomlinson <rubberducky703_at_hotmail.com>
Date: Tue, 11 Nov 2003 11:38:39 -0000
Message-ID: <boqho1$1hfdoo$1@ID-116287.news.uni-berlin.de>


All,

I have the following autonomous block. What I want to do is to iterate through each record in the result-set and simply output the job_id. I have simplified the example greatly for your viewing:

DECLARE
    TYPE recordset IS REF CURSOR;
    lresult recordset;
BEGIN
    open lresult for select * from jobs;     close lresult;
    for lrec in lresult
    loop

        dbms_output.put_line(lrec.job_id);     end loop;
END; I get the error: PLS-000221: 'LRESULT' is not a procedure or is undefined ORA-06550. Any ideas how I can get around this?
PT

P.S. Does anyone know of any good PL/SQL newsgroups/news servers? Received on Tue Nov 11 2003 - 05:38:39 CST

Original text of this message

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