dynamic columns [message #241302] |
Tue, 29 May 2007 02:55 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
|
I have defined a cursor and fetch rows from the database.
lets assume that the result i get is
10
15
45
15
78
45
95
i have defined a table in the database having fields
Table abc
field1_value varchar2(30);
field2_value varchar2(30);
field3_value varchar2(30);
field4_value varchar2(30);
field5_value varchar2(30);
field6_value varchar2(30);
field7_value varchar2(30);
field8_value varchar2(30);
field9_value varchar2(30);
field10_value varchar2(30);
i need to assign the result from the cursor to these fields starting from field1_value.
|
|
|
Re: dynamic columns [message #241324 is a reply to message #241302] |
Tue, 29 May 2007 04:37 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
mustaf_82
Messages: 20 Registered: May 2007 Location: UAE
|
Junior Member |
|
|
you can assign the cursor value to the field.
Example;cursor c1 is
select field1,field2,field3.....
from table_name
where <ur_condition>;
for m in c1 loop
field1:= m.field1;
field2:= m.field2;
field3:= m.field3;
.
.
.
.
.
field10:=m.field10;
end loop;
|
|
|