Solved

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

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Access Query concatenation 12 46
query question 13 41
query help 18 52
Need Distinct Value from Joined Tables in MSSQL 5 33
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…
If you find yourself in this situation “I have used SELECT DISTINCT but I’m getting duplicates” then I'm sorry to say you are using the wrong SQL technique as it only does one thing which is: produces whole rows that are unique. If the results you a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

747 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

13 Experts available now in Live!

Get 1:1 Help Now