I have the following custom type:
CREATE OR REPLACE TYPE INJURED_PERSON
AS
OBJECT
(
PIN VARCHAR2(7),
FNAME VARCHAR2(20),
LNAME VARCHAR2(20),
PATRONYMIMC VARCHAR2(20),
POSITIONID NUMBER(8,0),
REPORTID NUMBER(10,0),
OUTCOME NUMBER(1,0) );
And another custom type that serves as a table of the above type:
CREATE OR REPLACE TYPE INJURED_PEOPLE
AS TABLE OF INJURED_PERSON;
On the other hand I have a stored procedure that accepts only one parameter of type INJURED_PEOPLE. Inside the procedure I want to get the INJURED_PERSONs in the Input parameter and insert them to a table.I know that I can loop through the array (my input parameter) and insert one by one. But I would like to do something like this:
INSERT INTO MY_TAB SELECT something FROM MyInputParam.Pin
Is this possible in Oracle?