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.
Can I load rows from an excel sheet to a database table in BULK
-
13-12-2021 - |
Pergunta
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,
Solução
Outras dicas
Download SQL Developer. It has a nice function to insert into a table from an Excel spreadsheet.
Look into SQLLoader.
This sentence left intentionally blank.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow