Excel Import Oracle Database

Source: Internet
Author: User

1. Enter Excel Test form, Test.xls.
2. Save As. csv format
3. Create the Sql*loader control file Test.ctl, which reads as follows:
Load data
Infile ' C:\test.csv '
Insert INTO table test fields terminated by ', ' (COLUMN1,COLUMN2,COLUMN3,COLUMN4,COLUMN5)

Data files need to be copied to the corresponding location

4. Create a corresponding test table in the database tests

CREATE TABLE Test (
Column1 Varchar2 (10),
Column2 Varchar2 (10),
Column3 Varchar2 (10),
Column4 Varchar2 (10),
Column5 Varchar2 (10)
)

5. Execute the Import command
Sqlldr userid = system/123456 control= ' C:\test.ctl '

Import Successful!

Report:
Description of the SQLLDR function keyword:
Userid--oracle User name UserID = Username/password
Control-controls the name of the file = ' E:\insert.ctl '
log–-log file name log = ' E:\insert.log '
bad--Corrupt file name
Data--data file name
Discard--discard file name
Discardmax--number of discards to allow (default all)
skip--number of record rows skipped while importing (default 0)
load--the number of record rows imported when importing (default all)
errors--number of rows allowed for error (default 50)

CTL File Content Description:
Load data
Infile ' e:\test.csv '--Data source file name
Append|insert|replace--append appended to the table, insert inserts an empty table, replace replaces the original content
into table test--the name of the database table to import
[When id = id_memo]--filter condition
Fields terminated by X ' 09 '--field delimiter
(id,name,telphone)--List of field names


Excel Import Oracle Database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.