• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 445
  • Last Modified:

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

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
UBB
Asked:
UBB
2 Solutions
 
lcohanDatabase AnalystCommented:
(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
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now