Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

timestamp to date from filler in sqlldr

1932140Mar 1 2019 — edited Mar 1 2019

Hi

The following is a sample of data I am attempting to load using sql ldr.

ENTITY->LOAD_DATE->SOME_FLAG

XX->2019-01-30 02:10:20.83043->Y

YY->2019-01-30 02:10:20.83043->X

"->" denotes tab delimited in the above sample.

The column on the table, TBL.LOAD_DATE, is DATE.

The control file I am using is :

options (skip=1

load data

infile 'some_file.txt'

into tbl

fields terminated by x'9'

trailing nullcols

(entity char(10),

date_with_ts filler,

load_date date "trunc(to_timestamp(:date_with_ts,'yyyy-mm-dd hh24:mi:ss:ff'))",

some_flag char(1)

)

I get the following sqlldr error :

ORA-01821: date format not recognized

Can anybody assist me with the correct date format?

Also, is there a way not to use a filler, instead format the load_date to date without referencing a filler ?

This post has been answered by Mustafa KALAYCI on Mar 1 2019
Jump to Answer
Comments
Post Details
Added on Mar 1 2019
4 comments
1,682 views