Solved

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

Posted on 2014-11-22
1
397 Views
Last Modified: 2014-11-23
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
Comment
Question by:GurcanK
1 Comment
 
LVL 34

Accepted Solution

by:
johnsone earned 500 total points
ID: 40460565
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now