We are migrating from SQL Server 2005 to Oracle 11G. I have been trying to do an update to a table in Oracle using data stored in a table in SQL Server.
Using SQL Developer, I have completed the following:
Created a connection to the Oracle Database
Created Connection name --> e9_crp Supplied User name and Pass Defined Host Name and SID
I also created a connection to the SQL Server that contains the reference data
Connection Name --> sql_data User Name and Pass Host and Port
The connection name used for SQL Server is sql_data
The connection name used for Oracle is e9_crp
The table in SQL Server is in a database my_tmp
with owner of dbo and is called tiers
(my_tmp.dbo.tiers
).
In SQL Developer, I can see, select, and view the tiers table. This SQL statement also works using the worksheet when in the sql_data
connection:
select * from [my_tmp].[dbo].[tiers]
Trying to connect to this table when in the e9_crp
connection schema, I have been trying to do something like this:
select * from [sql_data].[my_tmp].[dbo].[tiers]
But this returns an error stating that the tiers table does not exist:
ORA-00903: invalid table name
00903. 00000 - "invalid table name"
Both tables have a unique ID of 'item', so in a perfect world this should work:
select a.itm, b.tier
from [e9_crp].[crpdta].[itemmaster] a inner join [sql_data].[my_tmp].[dbo].[tiers] b
on(a.itm = b.itm)
This is assuming that I use the connection name in the table identifier. BUT, this obviously does not work. What I need to do is be able to join these 2 databases together in a similar fashion as necessary.
How can I use SQL Developer to join these 2 tables? I have tried multiple iterations of table strings for the join but no luck. Any help is appreciated.