1

I want to get the value of an attribute of an Oracle object. This is my object:

create type demo_obj as object( val1 number, val2 number, val3 number );

And here is the array:

create type demo_array as table of demo_obj;

I create a procedure like this:

create or replace procedure proc_obj_demo ( obj_array DEMO_ARRAY )
as begin

FOR i IN 1..obj_array.COUNT
 LOOP
     INSERT INTO test_strings (s) VALUES (obj_array(i).demo_obj.val1);  //here's the     error

 END LOOP;
end;

But how can I get the value of an attribute of an Oracle object?

4

1 回答 1

1

Change the line to:

 INSERT INTO test_strings (s) VALUES (obj_array(i).val1);
于 2011-03-06T11:33:47.567 回答