Solved

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

Posted on 2004-10-06
6
578 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
[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
  • 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
push and Pull replication 31 48
SQL 2016: choose separate instances for software install; performance 19 24
Can I skip a node in XML? 9 35
SQL Select Query help 1 38
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

733 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