We've test1 and test2 conditions. You will find 2 tables contact and customers table both in conditions.
T.Contact T.User T1.User
The contact is reference table and also have to update user table ID. Now, we're doing following steps to update in user ID of T.Contact:
- find surname in ID of T.User based on User IDs in T.Contact
- find IDs in T1.User for up-to-date ID
- change User IDs in T.Contact
We're wondering whether possible ways are exist or otherwise.
When we were built with a same DB, we're able to use such as this: presumptions.
UPDATE T.Contact SET USER_ID IN ( SELECT USER_ID FROM T.User A, T.Contact B , T1.User C WHERE A.LNAME = C.LNAME AND A.FNAME = C.FNAME AND A.USER_ID = B.USER_ID )
Can you really call different conditions DB?
We ought to say Different Schemas rather than conditions.
It may sound as if you are searching for database links.
You may create a hyperlink in one database to a different such as this:
CREATE DATABASE LINK otherdb CONNECT TO schema IDENTIFIED BY password USING 'service_name'
Then technology-not only in queries such as this:
select ... from tablename@otherdb;
Are you currently coping with two separate databases, or simply two schemas within the same database?