When loading date formats through sqlldr you can use to_date function. See the example below
LOAD DATA
INFILE data.csv
BADFILE data.bad
DISCARDFILE data.dsc
TRUNCATE INTO TABLE external_id_equip_map
Fields terminated by "," Optionally enclosed by '"'
TRAILING NULLCOLS
(EXTERNAL_ID, SUBSCR_NO, SUBSCR_NO_RESETS, EXTERNAL_ID_TYPE, ACCOUNT_NO, SERVER_ID,
ACTIVE_DATE "to_date(:active_date , 'dd/mm/yyyy')",
INACTIVE_DATE)
BEGINDATA
55349067007,77815573,0,1,77810573,7,31/05/2002
vw-audi-special,77815573,0,3,77810573,7,31/05/2002
77815573,77815573,0,2,77810573,7,31/05/2002
If there are multiple formats in the input data then you can define a custom function and use that function instead of to_date.
Refer to the following link for more details
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1365403168188
No comments:
Post a Comment