Solved

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

Posted on 2013-11-01
2
424 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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