Home » SQL & PL/SQL » SQL & PL/SQL » Dynamic RowType Columns (Oracle 10g)
Dynamic RowType Columns [message #407340] Tue, 09 June 2009 16:29 Go to next message
developer21
Messages: 1
Registered: June 2009
Junior Member
Hi All,

Is it possible to assign values to columns dynamically like below:

CREATE OR REPLACE PROCEDURE test
AS
TYPE type_test IS TABLE OF test%ROWTYPE;
t_test_data type_test := type_test();
v_variable_column VARCHAR2(50) := 'COLUMN1';
BEGIN
t_test_data.extend;

--line below wouldn't work but looking for something similar
t_test_data(t_test_data.last).||v_variable_column|| := 'Some Data';
END;

In my case, the value for v_variable_column would be coming from some config table but I just set it to 'COLUMN1' above as an example.

Thanks in advance.
Re: Dynamic RowType Columns [message #407347 is a reply to message #407340] Tue, 09 June 2009 17:04 Go to previous message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
>Is it possible to assign values to columns dynamically like below:
NO
Previous Topic: Reading a CLOB object
Next Topic: PL SQL Trigger
Goto Forum:
  


Current Time: Fri Dec 09 15:35:23 CST 2016

Total time taken to generate the page: 0.14548 seconds