Populating an object able type throug a loop
Hi:
I need help in figuring out how I can assign objects to an object table type in a loop.
I have the following object type:
create or replace
TYPE xxbst_ste_shiplines_t as OBJECT(
quantity NUMBER,
length NUMBER,
Width NUMBER,
height NUMBER,
dimension_uom VARCHAR2(5),
weight NUMBER,
weight_uom VARCHAR2(5)
);
Then I have a table type based on that object;
create or replace
type xxbst_ste_shiplines_tab_type
AS TABLE OF xxbst_ste_shiplines_t;
Now in my PLSQL procedure I have declare a variable of the table type:
. . .
v_shiplines_tab xxbst_ste_shiplines_tab_type;
. . .
Normally, the process of populating the table type might look like this:
. . .
v_shiplines_tab := xxbst_ste_shiplines_tab_type(xxbst_ste_shiplines_t( 70,32,40,50,'KG',140,'KG'),
xxbst_ste_shiplines_t(14,15,20,30,'KG',42,'KG')
);
. . .
BUT, my requirement is to populate it with a FOR LOOP with each iteration of the loop giving me the set of values.
How can I do thie populating within a loop?
Please please help.
Thanks.
Bruce