Home > database >  SQL loader import data, combined with the last column will not be able to normal import
SQL loader import data, combined with the last column will not be able to normal import

Time:10-06

Using SQLLDR import data is time, in the control file to remove the deptno column can normal import,

Input the deptno column, after all the data is imported, all run into bad file,

I checked our such characters, no Spaces please help explain the great god, thank you!


The load data
Infile '/home/oracle/abC. CSV'
Truncate
Into the table t
Fields terminated by ', '
The trailing nullcols
(EMPNO, ENAME, JOB, MGR HIREDATE date 'YYYY/MM/DD HH24: MI: SS', SAL, comm, deptno)

Oracle @ oraclelinux2:/home/oracle $cat ab. CSV
EMPNO, ENAME, JOB, MGR HIREDATE, SAL, COMM, DEPTNO
7369, SMITH, the CLERK, 7902198 0/12/17 0:00, 20, 800,
7499, ALLEN, SALESMAN, 7698198 1/2/20 0:00, 1600300, 30
7521, WARD, SALESMAN, 7698198 1/2/22 0:00, 1250500, 30
7566, JONES, MANAGER, a quarter of 7839198/20:00, 20, 2975,
7654, MARTIN, SALESMAN, 1/9/28 0:00, 7698198, 1250140, 30
7698, BLAKE, MANAGER, 7839198 1/5/1 0:00, 2850, 30
7782, CLARK, MANAGER, 7839198 1/6/9 0:00, 10, 2450,
7788, SCOTT, the ANALYST, 7566198 7/4/0:00, 19, 3000, 20
7839, KING, PRESIDENT, and 1981/11/17 0:00, 10, 5000,
7844, TURNER, SALESMAN, 7698198 1/9/8 0:00, 1500,0,30
7876, ADAMS, CLERK, 7788198 7/5/23 0:00, 20, 1100,
7900, JAMES CLERK, 1/12/3 0:00, 7698198, 950, 30
7902, FORD, ANALYST, 7566198 1/12/3 0:00, 3000, 20,
7934, MILLER, CLERK, 2/1/23 0:00, 7782198, 1300, 10



SQL> Desc t;
The Name of Null? Type
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
EMPNO NUMBER (4)
ENAME VARCHAR2 (10)
JOB VARCHAR2 (9)
MGR NUMBER (4)
HIREDATE DATE
SAL NUMBER (7, 2)
COMM NUMBER (7, 2)
DEPTNO NUMBER (2)

CodePudding user response:

How data and two ", ", such as: 0800, 20

CodePudding user response:

I estimate that file is under Windows, a carriage return and line feed,
Do you import under Linux, carriage returns, and the back of the Numbers together to import, because together not Numbers, so an error,

CodePudding user response:

refer to the second floor sbaz response:
I estimate file is under Windows, a carriage return and line feed,
Do you import under Linux, carriage returns, and the back of the Numbers together to import, because together not Numbers, so an error,

+ 1
Other tabs are not visible and print operator may also affect the results

CodePudding user response:

The bottom null values in the second column next try with 0
  • Related