Reputation: 674
I need to do a select on a number in Database A.Table A and also check if this Number exists in Database B.Table A
So far I have tried
select ID from Table A where ID in (select ID from UN/PW@//host:1521/SID.Table A)
I have no idea if this is the correct syntax. I am currently writing this in Oracle Developer and then adding it to my perl code using DBI and DBD Oracle.
Help appreciated thanks.
Upvotes: 0
Views: 1150
Reputation: 1511
Open two separates DB connection which will point you to two different databases, then use first connection to obtain value from database A and second connection from database B, at the end compare what you got in PERL. In order to be able to query two different databases in a one query you need to use db link. Check this tutorial: http://docs.oracle.com/cd/B28359_01/server.111/b28324/tdpii_distdbs.htm#BABJDEED
Upvotes: 0