control file dwh.ctl
LOAD DATA
APPEND INTO TABLE CDR_UNRATED
(
WK_BMP_USAGE INTEGER EXTERNAL TERMINATED BY “,”,
WK_USAGE_TYPE INTEGER EXTERNAL TERMINATED BY “,”,
WK_EXCHANGE_ID INTEGER EXTERNAL TERMINATED BY “,”,
WK_TRANS_DT INTEGER EXTERNAL TERMINATED BY “,”,
WK_TRANS_TM INTEGER EXTERNAL TERMINATED BY “,”,
CDR_SEQUENCE_NUMBER INTEGER EXTERNAL TERMINATED BY “,”,
TRANS_DT DATE “ddmmyyyyhh24miss” TERMINATED BY “,”,
UNITS INTEGER EXTERNAL TERMINATED BY “,”,
RELATED_CALL_NUMBER INTEGER EXTERNAL TERMINATED BY “,”,
A_NUMBER CHAR TERMINATED BY “,”,
C_NUMBER CHAR TERMINATED BY “,”,
IN_SERVICE_IND CHAR TERMINATED BY “,”,
CALL_STATUS CHAR TERMINATED BY “,”,
MARKETING_CALL_STATUS CHAR TERMINATED BY “,”,
ANSWER_TIME INTEGER EXTERNAL TERMINATED BY “,”,
B_NUMBER CHAR TERMINATED BY “,”,
CHARGED_NUMBER CHAR TERMINATED BY “,”,
EXTERNAL_TYPE_ID INTEGER EXTERNAL TERMINATED BY “,”,
B_CATEGORY CHAR TERMINATED BY “,”,
SERVICE_TERMINATING CHAR TERMINATED BY “,”,
EXCEPTION_CODE CHAR TERMINATED BY “,”,
MEDIA_NUMBER CHAR TERMINATED BY “,”
)
CSV file
086,01,12345678912345,12345678912345,31122006,235959,1,31122006235959,12,0301234567,0301234567,10,U,A,5,182123451,282123451,1,15,I,abcdeabcdeabcde,1
Start SQL Loader
$ sqlldr TCT/TCT@ORCL control=dwh.ctl log=dwh_import.log data=DHW_20060501235959.csv