Dynamic SQL

From: Dainius Januska <dainius_at_nomagiclt.com>
Date: 2000/06/07
Message-ID: <393E57FA.CEE0780F_at_nomagiclt.com>#1/1


[Quoted] I have the following procedure with dynamic SQL :



DECLARE
    cid                       Number;
    sql_st                   Varchar2(100);
    rows_processed   Number;
    unit_name             dbms_sql.Varchar2_Table;
BEGIN
      sql_st := 'select name from my_table';
      cid := dbms_sql.open_cursor;
      dbms_sql.parse(cid, sql_st, 0);
      dbms_sql.define_array(cid, 1, unit_name, 10, 1);
      rows_processed := dbms_sql.execute(cid);
      rows_processed := dbms_sql.fetch_rows(cid);

--at this point rows_processed = 10

      dbms_sql.column_value(CID, 1, unit_name);

--unit_name.count returns 0


That is unit_name is empty. Does anyone have an idea ?

Thanks in advance,
Dainius Received on Wed Jun 07 2000 - 00:00:00 CEST

Original text of this message