Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-11-22
1
Medium Priority
?
435 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 35

Accepted Solution

by:
johnsone earned 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example, show how to take different types of Oracle backups using RMAN.

722 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