Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 443
  • Last Modified:

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
0
GurcanK
Asked:
GurcanK
1 Solution
 
johnsoneSenior 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

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now