Hi, You might want to consider setting up support for Federated Databases which would allow you to access tables from different Databases using Nicknames.
Graham Whitmore -----Original Message----- From: Shi, Zhong [mailto:[EMAIL PROTECTED]] Sent: 06 January 2003 22:46 To: [EMAIL PROTECTED] Cc: '[EMAIL PROTECTED]' Subject: [DB2EUG] What is the best way to update tables in one instance from tables on other instance on the same system? List Experts, We need to update table A, B on database Workspace on inst01 by using data from table A1, B1 on Warehouse on inst02 on the same system (AIX 4.2, RS/6000. UDB 7.2). Here is the specification: query keys from the Workspace for A and B tables. Then using those keys on Warehouse, search and retrieve rows which match A, B (in the corresponding tables A1, B1) and save that retrieved data, to be used for updating the original tables A, B on Workspace. New data which exists in Warehouse will not be inserted into Workspace, only existing data in Workspace will be updated with current data from Warehouse. Here is the approach I want to implement: Export two files which contain potential keys from the A and B tables on Workspace. Create two temp tables that will hold the A and B keys on Warehouse. Import the two key files into the two corresponding temp tables created in step 2. Export the results from joining the temp table with the like A1 or B1 table, extracting the fields to be used to update A, B on Workspace. Import with insert-update option on Workspace. I believe these steps will work. But I feel that there is too much involved. Can any one think of a better approach so that I don't need to do the import, export steps? Can I have a way to join the two databases tables and update the target table directly? Any comment is highly appreciated. Thanks. Zhong Shi DBA Incepture, Inc. - ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc - ::: When replying to the list, please use 'Reply-All' and make sure ::: a copy goes to the list ([EMAIL PROTECTED]). *** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED] *** For more information, check http://www.db2eug.uni.cc
