Hi,
What is the best way to do bulk insert from c# UI into Oracle database. I tried it passing XML string into oracle (see the below code) but xmltype doesn't accept more than 4000 characters.
PROCEDURE UDPATE_NEIGHBOUR_BY_EXTENT(P_XML IN CLOB) AS
v_today date :=SYSDATE;
BEGIN
FOR item IN (
SELECT xt.* FROM XMLTABLE('/neighbours/row'
PASSING XMLTYPE(P_XML)
COLUMNS
PA_REFERENCE NUMBER(12) PATH 'reference',
ADDRESSABLE_OBJECT_CODE VARCHAR2(12) PATH 'addressableobjectcode',
CREATE_BY VARCHAR2(25) PATH 'createdby',
ADDRESS_TEXT VARCHAR2(2000) PATH 'addresstext',
NON_POSTAL_ADDRESS CHAR(1) PATH 'nonpostaladdress'
)xt)
LOOP
INSERT INTO PA_NEIGHBOUR(PA_REFERENCE, ADDRESSABLE_OBJECT_CODE, EFFECT_DATE, CREATE_DATE, CREATE_BY, ADDRESS_TEXT, NON_POSTAL_ADDRESS)
VALUES( item.PA_REFERENCE, item.ADDRESSABLE_OBJECT_CODE, v_today, v_today, item.CREATE_BY, item.ADDRESS_TEXT, item.NON_POSTAL_ADDRESS);
END LOOP;
END UDPATE_NEIGHBOUR_BY_EXTENT;
so, What’s the best way to do bulk insert in oracle?
What is the best way to do bulk insert from c# UI into Oracle database. I tried it passing XML string into oracle (see the below code) but xmltype doesn't accept more than 4000 characters.
PROCEDURE UDPATE_NEIGHBOUR_BY_EXTENT(P_XML IN CLOB) AS
v_today date :=SYSDATE;
BEGIN
FOR item IN (
SELECT xt.* FROM XMLTABLE('/neighbours/row'
PASSING XMLTYPE(P_XML)
COLUMNS
PA_REFERENCE NUMBER(12) PATH 'reference',
ADDRESSABLE_OBJECT_CODE VARCHAR2(12) PATH 'addressableobjectcode',
CREATE_BY VARCHAR2(25) PATH 'createdby',
ADDRESS_TEXT VARCHAR2(2000) PATH 'addresstext',
NON_POSTAL_ADDRESS CHAR(1) PATH 'nonpostaladdress'
)xt)
LOOP
INSERT INTO PA_NEIGHBOUR(PA_REFERENCE, ADDRESSABLE_OBJECT_CODE, EFFECT_DATE, CREATE_DATE, CREATE_BY, ADDRESS_TEXT, NON_POSTAL_ADDRESS)
VALUES( item.PA_REFERENCE, item.ADDRESSABLE_OBJECT_CODE, v_today, v_today, item.CREATE_BY, item.ADDRESS_TEXT, item.NON_POSTAL_ADDRESS);
END LOOP;
END UDPATE_NEIGHBOUR_BY_EXTENT;
so, What’s the best way to do bulk insert in oracle?