Solved

SQL developer query - exist statement to compare data in Oracle DB to MS SQL DB

Posted on 2013-11-01
2
421 Views
Last Modified: 2013-11-14
Hi there

I'm using SQL Developer (2.1.1.64), and have both a connection to an Oracle database and a MS SQL database.
In a particular table in the Oracle DB I have a field info that should exist in a respective table/field in the MS SQL database.
How can I create an 'exists' statement to compare the two?


Thanks
0
Comment
Question by:UBB
2 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 250 total points
ID: 39616866
(unfortunately) I don't think that is possible from ORACLE tools to SQL however...SQL Server provides Linked Server to ORACLE functionality including via native ORACLE OLEDB driver so you could write such script and execute it in SQL where you compare the table/column from SQL Server database against ORACLE_linkedServer.Ora_database.SchemaName.TableName

That's the easiest way as far as I can see it and either way you can use full name qualifier via SQL Linked Servers
"How to set up and troubleshoot a linked server to an Oracle database in SQL Server"
http://support.microsoft.com/kb/280106
0
 
LVL 65

Assisted Solution

by:Jim Horn
Jim Horn earned 250 total points
ID: 39627195
This can also be done in an SSIS data flow tasks, with a data source for one of these (SQL Server or Oracle), then a lookup task that defines the second one, and the column(s) you wish to JOIN the two tables, and any new column(s) to bring along for the ride.

Also, the output of the Lookup tasks will have separate paths for whether a match was found or not.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

895 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

14 Experts available now in Live!

Get 1:1 Help Now