Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-10-06
6
Medium Priority
?
581 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 1000 total points
ID: 12241450
0
 
LVL 6

Assisted Solution

by:RaisinJ
RaisinJ earned 1000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

610 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