Dynamic SQL: dbms_sql package
Date: 1997/04/01
Message-ID: <3341620E.5C27_at_americasm01.nt.com>#1/1
[Quoted] Is there anyway that I can use a PL/SQL table in a dbms_sql.define_column declarations?
[Quoted] PROBLEM: I want to declare variables for the columns in a dynamically created SELECT statement where the number of columns is variable.
Example:
[Quoted] Created a 2-column PL/SQL table called TEST(c_name VARCHAR2,c_value VARCHAR2) indexed by an integer i.Populated this table from a cursor which returned the column names that would be used in the dynamically created SELECT string. My define column statement looked like this:
[Quoted] for i in 1..TEST.count LOOP
[Quoted] dbms_sql.define_column(cursor_id,i,test(i).c_value);
END LOOP [Quoted] The ORACLE error message was there were 'too many declarations' for this define column.
[Quoted] H E L P !!!
Thank you. Received on Tue Apr 01 1997 - 00:00:00 CEST