title: Using 'open cursor' as 'execute immediate'
body: <p>I am trying to use open cursor as a substitute for execute immediate because my SQL statement could return multiple records. </p>
  
  <pre><code> open cur1 for rule_sql;
     loop        
      dbms_output.put_line(cur1.rule_id);
     end loop;
   close cur1;
  </code></pre>
  
  <p>It throws an error saying: "PLS-00487: Invalid reference to variable 'CUR1'"</p>
  
  <p>Has anyone had similar issues? Any help is much appreciated :) </p>