简体   繁体   中英

BULK load into Oracle not working with script

I trie to load a csv file into my oracle database. i use the script below for insert. But it dosen't work. The word 'DATA' in the first line is underlined and comment as "bad syntax" --- Why?

LOAD DATA INFILE 'c:\\SCHWEIZER_DATA_TABLE.csv'
INTO TABLE PEP
CHARACTER SET UTF8
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE  1 ROWS;

You're trying to use SQL*Loader control file syntax. LOAD is not a SQL command, and you can't use that control file as a statement in SQL Developer.

You can use SQL*Loader if you have the full client or server installed on your PC - the instant client does not include it. If you can put the file on the server you could use an external table .

But SQL Developer has its own data import wizard which you can use to load the data from your file.

Use this wizard to import data into a table. For example, if you right-click the Tables node or a table name in the Connections navigator and select Import Data, you can specify the .source file (such as a spreadsheet or a delimited file) from which to import data. You create a table and import data into it, or import data into an existing table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM