I am facing some issues in loading a CSV file through SQL Loader.
Here is the control file:
LOAD DATA
INFILE 'mp.csv'
BADFILE mp.bad'
INSERT
INTO TABLE mp_staging
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
TRAILING NULLCOLS
(
mp_id INTEGER,
mp_name CHAR,
mp_desc CHAR,
oid CHAR,
ptye_cd CHAR,
creation_tmstmp TIMESTAMP WITH TIME ZONE "YYYY-MM-DD HH24:MI:SS,FF9",
modified_tmstmp TIMESTAMP WITH TIME ZONE "YYYY-MM-DD HH24:MI:SS,FF9",
last_generation_tmstmp TIMESTAMP WITH TIME ZONE "YYYY-MM-DD HH24:MI:SS,FF9",
deact_dt DATE,
)
Here are some sample records from CSV file:
1083,"Test3","","mills_b","PRIVATE",2000-12-06 14:29:21.17,1999-12-06 14:29:21.17,2011- 10-01 04:03:44.6
116,"Mike1","","mills_b","PRIVATE",1999-09-15 11:15:29.42,1999-09-15 11:15:59.663,2011- 10-01 04:01:23.923,,0,"F",""
I am facing two issues -
The second record gets inserted, but with a different mp_id in the table, as in the value inserted in the table is not 1083, but an alotgether differentnumber, which seems to be generated by a sequence, though I have not referred to any sequence in the control file.
The first record fails to load, with this error:
Record 1: Rejected - Error on table EQ_MP_STAGING, column CREATION_TMSTMP. ORA-01841: (full) year must be between -4713 and +9999, and not be 0
Can someone help me in right direction, so that I can debug these issues?