Oracle Insert - multiple rows in transaction possible?
Hi,
How to insert multiple rows at a time into Oracle table within one transaction?
Example:
Reading 10 lines from CSV/Excel file.
Insert 10 lines into Oracle using Oracle insert.
When one of the lines throws an error, none of the lines shall be written.
A classical rollback mechanism.
How to do that?
kind regards
Simon
Hi @Szymon,
-
The harder way:
If it’s literally 10, 20, or even 100s of rows you can dynamically build an INSERT INTO … VALUES()… pl/sql string and execute it with the Oracle - Execute snap. But if it’s thousands oF rows or even more, then you can store the temporary data into a temp table and then apply the BEGIN … COMMIT/ROLLBACK again with an Oracle - Execute snap. -
The easier way 🙂
But, maybe you’re seeking this option in a snap (Oracle - Bulk Load):
/Igor
-