How to Load Date Field to Timestamp(6) Field in Oracle Using SQLLOADER?

Dear Experts,

I want to load CSV (comma-delimited) text files to an Oracle table using SQLLOADER. In text file, one of the fields comes in Date Format YYYY-MM-DD HH:MI:SS. However, in the table the corresponding  field is TIMESTAMP(6). How can I load this field to that table?

Other thing: How can I do "INSERT INTO TAB1 (A) SELECT X FROM TAB2" if A is TimeStamp(6)  and X is DATE?

BR
GurcanKAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
johnsoneConnect With a Mentor Senior Oracle DBACommented:
There shouldn't be a problem loading dates into timestamp fields.  The subsecond portion of the timestamp will just be all 0s.

Are you getting an error with SQL*Loader?  If so, then you need to specify the date format in the control file.

The insert statement you have should work without issue.
0
All Courses

From novice to tech pro — start learning today.