oracle - storing date and time value through SQL LOADER -


i trying write control file sql loader. source file in fixed length format. have date , time present in source file , position 17 position 24 date in ccyymmdd format , position 25 34 in hh:mm:ss24 format. store date , time value form source file in date column in table in 'yyyymmdd hh24:mi:ss' format.

can please in telling how achieve in control file of sql loader?

would following piece of code do? doubt since there no space between date , time in source file?

append table target_table trailing nullcols ( date_column position(17:34) "to_date(:date_time,'yyyymmdd hh24:mi:ss')" ) 

any lead highly appreciated

check oracle's documentation boundfiller:

... (date_column boundfiller position(17:24),   time_column boundfiller position(25:34),   date_n_time position(1:1)               to_date(:date_column || ' ' || :time_column, 'ccyymmdd hh24:mi:ss'),  ... ) 

it allows define fields not correspond column.


Comments