Copy tables procedure [message #71136] |
Thu, 12 September 2002 23:22 |
Barry Dogger
Messages: 4 Registered: September 2002
|
Junior Member |
|
|
I am running a datawarehouse database and a production database. Furthermore, I have a table called XXWB_TABLES that contains the tablenames from the producton database that I wish to copy to the dwhs db.
I am trying to create a procedure that does the following:
1. For every tablename stored in XXWB_TABLES, check if the table exists in the dwhs db. If not, create it.
This step I already completed.
2. Next, for every table in XXWB_TABLES, compare the table in the production db with the table in the dwhs db and make an exact replica of the producton database
(in other words, delete all entries in dwhs that are no longer in the production, update all changed records and insert all new records).
I can not get the second part to work. Any help would be appreciated.
Thnx in advance.
Barry Dogger
|
|
|
|
|