I am trying to write a control file for sql loader. The source file to which the fixed-length format refers. I have a date and time in the source file, for example, say, from position 17 to position 24 for a date in format CCYYMMDDand from position 25 to 34 in format HH:MM:SS24. I like to store this source file of a date and time form in a date column in some table in the format "YYYYMMDD HH24: MI: SS".
Can someone help on how to do this in sql loader control file?
Does the next piece of code execute? I doubt that there is no space between the date and time in the source file?
APPEND INTO TABLE target_table
TRAILING NULLCOLS
(
date_column POSITION(17:34) "TO_DATE(:DATE_TIME,'YYYYMMDD HH24:MI:SS')"
)
Any guidance would be highly appreciated.
source
share