Get attribute from Oracle object
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;
开发者_C百科
But how can I get the value of an attribute of an Oracle object?
Change the line to:
INSERT INTO test_strings (s) VALUES (obj_array(i).val1);
精彩评论