Search code examples
oracle11goracle11gr2oracle11gr1

Can I load rows from an excel sheet to a database table in BULK


I have to INSERT 500 rows to a table in Oracle 11g. I am using the below command one-by-one.Can I do it all at a time?

for e.g. what I am doing now-

INSERT INTO bonus SELECT ename, job, sal, comm FROM emp
   WHERE comm > sal * 0.25;
...
INSERT INTO emp (empno, ename, job, sal, comm, deptno)
   VALUES (4160, 'STURDEVIN', 'SECURITY GUARD', 2045, NULL, 30);
...
INSERT INTO dept
   VALUES (my_deptno, UPPER(my_dname), 'CHICAGO');

Thanks,


Solution

  • I would export my Excel table in CSV format, and use search and replace, using regular expressions, in an editor to substitute each line of comma separated values for an INSERT command, and then run those commands.