sql loader - SQLLDR CTL: Load date field received in DDMonYYYY to db fields with formats of YYYYMM or MM/DD/YYYY -
i have source date info in format of ddmonyyyy (e.g. 25jan2014). using sqlldr load info various fields of 2 different formats (1) yyyymm , (2) mm/dd/yyyy. how accomplish this? thanks.
i assume putting info varchar2 column, lines in command file should info beingness manipulated on way in alter formatting. first convert date, utilize to_char format it:
,date_rx_written char "to_char(to_date(:date_rx_written, 'ddmonyyyy'), 'yyyymm')" or
,date_rx_written char "to_char(to_date(:date_rx_written, 'ddmonyyyy'), 'mm/dd/yyyy')" if able to, consider making date datatype in table instead , convert on way in. way can convert needed when select instead:
,date_rx_written date "ddmonyyyy" date sql-loader
No comments:
Post a Comment