But it is created but with compilation errors. Could you, please, check the errors?What errors are you getting? Why not giving them in the first place?
And what is the best way for bulk inserting?Certainly not a PL/SQL FOR-LOOP with a COMMIT inside it.
INSERT INTO TBLFINANCIALDATA (FK_GROUPID, FK_COLUMNID, FK_COMPANYREGID, FK_REGION, FK_PERIODID, AMOUNT, FK_REPORTID, FK_ROWID, FK_ACCOUNTANTID, FISCALYEAR, ACCOUNTINGPRD) SELECT FK_GROUPID, FK_COLUMNID, FK_COMPANYREGID, FK_REGION, FK_PERIODID, AMOUNT, FK_REPORTID, FK_ROWID, FK_ACCOUNTANTID, FISCALYEAR, ACCOUNTINGPRD FROM XMLTable( '/FINANCIALDATA/FINANCIALDATADETAIL' passing xmltype(V_FINDTL) columns FK_GROUPID number path 'FK_GROUPID' , FK_COLUMNID number path 'FK_COLUMNID' , FK_COMPANYREGID varchar2(15) path 'FK_COMPANYREGID' , FK_REGION varchar2(15) path 'FK_REGIONID' , FK_PERIODID number path 'FK_PERIODID' , AMOUNT number path 'AMOUNT' , FK_REPORTID number path 'FK_REPORTID' , FK_ROWID number path 'FK_ROWID' , FK_ACCOUNTANTID varchar2(30) path 'FK_ACCOUNTANTID' , FISCALYEAR number path 'FYear' , ACCOUNTINGPRD number path 'FPeriod' ) x ;
- "XMLType" is a very bad choice for a variable nameThe variable name is the reason your program will not compile. The xmltype() in the SQL statement is trying to reference the variable name. If you were to rename it to a better choice, the procedure would compile. As you don't even use that variable, you could safely delete it.