The data from the infile is in the format MM/DD/YYYY
how do I tell the control file to load it into the database as YYYYMM
?
When you specify the columns in the INFILE declare just identify the format the data is held in. Like this
load data
infile 'whatever.csv'
into table t23
fields terminated by ','
trailing nullcols
(
col_1 integer
, col_2 char
, col_3 date "MM/DD/YYYY"
, col_4 date "MM/DD/YYYY"
, col_5 char
)
Don't worry about the "to" date format. That is only for display purposes. Oracle stores dates in its own internal representation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With