Best way to bulk insert data into Oracle database

我是研究僧i 提交于 2019-12-04 08:24:58
Vincent Malgrat

Load the records in a stage table via SQL*Loader. Then use bulk operations:

To keep It as fast as possible I would keep it all in the database. Use external tables (to allow Oracle to read the file contents), and create a stored procedure to do the processing.

The update could be slow, If possible, It may be a good idea to consider creating a new table based on all the records in the old (with updates) then switch the new & old tables around.

Shaakunthala

How about using a spreadsheet program like MS Excel or LibreOffice Calc? This is how I perform bulk inserts.

  1. Prepare your data in a tabular format.
  2. Let's say you have three columns, A (text), B (number) & C (date). In the D column, enter the following formula. Adjust accordingly.

="INSERT INTO YOUR_TABLE (COL_A, COL_B, COL_C) VALUES ('"&A1&"', "&B1&", to_date ('"&C1&"', 'mm/dd/yy'));"

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!