Notes for using oracle sqlloader

Source: Internet
Author: User

Oracle sqlloader notes command:

Sqlldr userid = username/pwd control = file log = logfile load data -- syntax keyword infile 'filename' -- data file for data import. The default format is. dat. If you want to import data from multiple files, then you can add infile in sequence to enable infile 'filename' -- and so on inifile * -- the data to be imported will be in the control file, And the begindata will guide the data starting point concatenate number -- Record several rows as a data processing line, you can only use continueif this () when using inindata) = '-' // check whether a connection character exists at the beginning of each line. If yes, connect the next line to a line of badfile 'badfilename' -- the bad file address discardfile 'discardfilename' -- description file address table name -- the table to which the data will be imported -- the method of loading table data append -- add replace on the basis of the original data -- delete the data of the original table, add a new data insert -- default value, which is used when loading an empty table. If there is data in the table, sqlloader will stop reporting an error, prompting that the table must be empty truncate -- truncate will be used to delete the data first, then, when loading the new data fields terminated by 'data delimiters 'optionally encolsed by', what delimiters are used for each data '-- "dfdf", "dfdfdf" terminated ', 'optionally encolsed by '"' the table column data is separated by commas (,). Each value is defined in double quotation marks, if there is any prefix in double quotation marks, it will be inserted as values into the table terminated by '09' -- separated by tabs, that is, the TAB key terminated by writespace -- takes the blank character as the separator trailing nullcols -- if the loaded data is empty, insert the table with NULL

 

(Column 1 [position ()] [filter] [function, field as function input parameter format: "function name (: column name)"-> name "upper (: name) "] [data type] [data format, such as date 'yyyy-mm-dd'], column 2 ..,...) -- If the filter keyword is added, the column data is ignored.
// When fields terminated by 'is not declared,' use a location to tell the field to load data // (// col_1 position (), // col_2 position ), // col_3 position (*: 16), // start position of the field at the end position of the previous field // col_4 position (), // col_5 position) char (8) // specify the field type //) begindata

 

Data // note that there must be no space before the value after begindata

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.