SQLLoader4 (the columns in the data file are inconsistent with the columns in the table-filler)

Source: Internet
Author: User
Tags table definition

A. The number of fields in the data file is less than the number of column fields in the table, but the missing columns in the data file can be empty in the table definition.
-----This is relatively simple, just write the name of the column in the data file to the control file. Because Sql*loader is based on the name of the field given in the control file and the location of the field in the data file, the data import is completed.
B. The number of fields in the data file is less than the number of column fields in the table, but the missing columns in the data file cannot be empty in the table definition and must be assigned a value.
-----This is a relatively minor problem, you cannot complete the mapping and data import through simple positional binding.
C. The number of fields in the data file is greater than the number of column fields in the table

-----Use the filler parameter in the control file to transition the unwanted columns in the data file
============================================
1. The field in the data file is less than the field in the table and is not allowed to be empty
Data files:
7369 SMITH Clerk
7499 ALLEN Salesman
7521 WARD Salesman
7566 Jone Smanager

Control files:

LOAD'D:\oracletest\ldr_tab_fiile.dat'REPLACE into TABLE  by-- if you want to import the source file This column content is empty, in the import into the database table, this column content is null(empno,ename,job , COMM "0-- assuming that the field COMM is not allowed to be empty is assigned a value of 0)

2. The fields in the data file are Gedo than the characters in the table

The

Data file is as follows:
7369 AAA SMITH 111 clerk
7499 BBB ALLEN 222 salesman
7521 CCC WARD 333 salesman
7566 DDD jone 444 S The MANAGER
needs the second and fourth columns in the staging data file, and the control file is as follows:

LOAD'D:\oracletest\ldr_tab_fiile.dat'REPLACE into TABLE  by-- if you want to import the source file This column content is empty, in the import into the database table, this column content is null(empno,data_col2 Filler,ename,data_col4 Filler,job,comm "1")

====
Data_col2, Data_col4 These two are casually named.

SQLLoader4 (the columns in the data file are inconsistent with the columns in the table-filler)

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.