for loop as text variable

From: jimmy <bigtoehere_at_hotmail.com>
Date: Wed, 19 Oct 2011 10:31:30 -0300
Message-ID: <31kt97l8k531clssbin2girmrlkoqicjfl_at_4ax.com>



Hi. I'm trying to use a varchar as the first part of a for loop but can't find a way to make it work.

    listCursor varchar2(100);

    if x is not NULL then

       listCursor := 'for x_rec in xC(parm1, parm2) loop';     else

       listCursor := 'for y_rec in yC(parm1, parm2) loop ';     end if;
    print listCursor **** not sure of syntax here or if this is even

possible.

....
....
end loop;

Any suggestions?

many thanks,
tony Received on Wed Oct 19 2011 - 08:31:30 CDT

Original text of this message