Dynamic Cursor

From: The Magnet <art_at_unsu.com>
Date: Tue, 15 Jun 2010 14:30:44 -0700 (PDT)
Message-ID: <2878308e-5ac8-46a6-afa0-551f9430789e_at_3g2000vbf.googlegroups.com>



We have a dynamic cursor with a dynamic IN clause:

     SELECT article_id, subject, teaser_message, message, category_id, category_name,

            publish_date, ex_publish_date, status_id, status_text, author_id, author_name

     FROM (SELECT article_id, subject, teaser_message, message,
                  TO_CHAR(publish_date,''MM/DD/YYYY HH24:MI:SS'')
publish_date,
                  TO_CHAR(ex_publish_date,''MM/DD/YYYY HH24:MI:SS'')
ex_publish_date,
                  s.status_id, status_text, author_id, author_name,
category_id, category_name
           FROM articles a, ststus s
           WHERE category_id ' || v_in_clause || '
             AND a.status_id = s.status_id
           ORDER BY publish_date DESC)
     WHERE rownum <= ' || p_return_count;

Then I have this:

FOR v_rec IN v_select LOOP

408/16 PLS-00456: item 'V_SELECT' is not a cursor

What's seems to be the issue here? Received on Tue Jun 15 2010 - 16:30:44 CDT

Original text of this message