Solved

MS SQL DTS - Oracle Dates error out on import into MS SQL table

Posted on 2004-10-06
6
573 Views
Last Modified: 2008-02-01
I am using MS SQL DTS to stage Oracle data to an MS SQL data store. MS SQL does not like the Oracle dates. Currently I have just changed the MS SQL data columns to a varchar field type. I would like instead to convert the date so that it can be imported into the datetime field. I have heard that there is an Oracle equivilant to the MS SQL CAST function. Anybody have any ideas on how to do this transformation? Just a note, it is not a driver issue, the same drivers have no problem with the Oracle dates when I link them in an access data base.
0
Comment
Question by:EVANFAGER
  • 2
6 Comments
 
LVL 6

Accepted Solution

by:
JaffaKREE earned 250 total points
ID: 12241450
0
 
LVL 6

Assisted Solution

by:RaisinJ
RaisinJ earned 250 total points
ID: 12241958
Try this...  You can also convert Date values in Oracle using the TO_CHAR, eg. TO_CHAR(@DATE, 'YYYY/MM/DD HH24:MM:SS'), function and TO_DATE, eg. to_date('1998/05/31:12:00:00AM', 'yyyy/mm/dd:hh:mi:ssam'), function.  The web page below goes over these functions and DATE formats you can use.  

Also, SQL Server has date limits where Oracle doesn't.  SQL Server cannot except dates less than January 1, 1753 and greater than December 31, 9999.  Oracle can, so make sure you don't accidently have any date values inside you Oracle DB which are beyond the range of SQL Server.

http://www-db.stanford.edu/~ullman/fcdb/oracle/or-time.html


0
 
LVL 6

Expert Comment

by:RaisinJ
ID: 12435185
I am all set thanks...  Hopefully my statements above gave some insite.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

757 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

16 Experts available now in Live!

Get 1:1 Help Now