Hi All,
I am getting this error for one of the Type defined as below
create or replace TYPE CONTRACTOR_TYPE AS OBJECT (
ID NUMBER(38),
FIRST_NAME VARCHAR2(100),
SURNAME VARCHAR2(100),
SECOND_NAME VARCHAR2(100),
START_DATE DATE,
END_DATE DATE,
USERNAME VARCHAR2(30),
EMAIL_ID VARCHAR2(100),
CREATE_DATE DATE,
UPDATE_DATE DATE,
USER CHAR(1),
CONTRACTOR_ID VARCHAR2(30)
);
However, I want to populate just some of the fields using
contractor_type(id,
first_name,
surname,
start_date,
end_date,
username
)
BULK COLLECT INTO p_contractors_delta
FROM
SELECT ct.id,
ct.first_name,
ct.surname,
ct.start_date,
ct.end_date,
ct.username
FROM TABLE(p_contractors) ct
which throws an obvious error PL/SQL:ORA-02315: incorrect number of arguments for default constructor
Question, how to have another constructor with few fields defined. The undefined fields can be null or some default. How do I define such a constructor for PLSQL types.
Thanks