Search code examples
databaseoracle-databaseoracle-sqldeveloperload-data-infile

How to import file into oracle table


I have a .tbl file with data and I'm trying to import this data into a table. I'm using SQL Developer for this with this command:

load data infile "C:\path\users.tbl" 
insert into table users fields terminated by "|" lines terminated by "\r\n;

But nothing is working, the data is not loaded and no errors are shown...Do you see why it's not working?


Solution

  • That looks like SQL*Loader syntax.

    For that to work, you'd have to run SQL*Loader, which is a separate command-line program available in your ORACLE_HOME/bin directory.

    If you don't have an ORACLE_HOME, you'll need to install the client. Then open a shell/cmd window, and run your command there.

    OR, if you want to use SQL Developer, you can use our wizard to read the file and insert the data, row-by-row.

    SQL Developer's import table data wizard