Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 get data from Oracle to SQL Server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-03-16 : 08:30:18
xyz writes "I tried to get data (at any certain date) from Oracle to SQL Server in three ways without success:

1. DTS: cannot put die global variables to die DTS source because it is Oracle.

2. Linked Server with OPENQUERY():
it seems that OPENQUERY doesn´t accept any variables.

3. Linked Server with TSQL select .. from NameOfLinkedServer..TableName Where...:

The Typ Date in Oracle is from 01.01.1600 which is differ from that of SQL-Server from 01.01.1753, sothat I cannot get data with Date at 01.01.1600.

Do you have any Idea how I can solve this problem? Thanks."

Kristen
Test

22859 Posts

Posted - 2005-03-16 : 09:13:37
We pull data from Oracle into a staging table using OPENQUERY. The dates from the Oracle database we connect to happen to be stored as milliseconds-since-1970 or somesuch, so we just do a DATEADD to those to get SQL Server dates.

For the OPENQUERY statement we create the SQL we want to use in a varchar @variable, and then use that as a parameter in the OPENQUERY

Kristen
Go to Top of Page

cwackked
Starting Member

2 Posts

Posted - 2005-03-22 : 13:27:52
OpenQuery does not return all of the rows back? Anyone have any idea why?
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2005-03-22 : 16:21:03
An example of your query etc. would help

Kristen
Go to Top of Page
   

- Advertisement -