question

erlokeshsharma08 avatar image
erlokeshsharma08 asked

Need suggestion with data loading approach

Hi Team, I need a favor from guys. I have different select statements that return me counts based on different joins and filter conditions. The counts need to go to a single table that is in different server. Now linked server and table variable/ temp tables are not allowed here. and I need to do it with the help of dts / sql 2000. Here is my approach:- 1. Made a permanent staging table at the linked server instance that is exact replica of target table 2. truncated staging table for each load. 3. insert primary key columns and some hard coded column values into the staging table using data driven task. 4. update the staging table with one of the counts column based on primary key columns inserted in step 3 using data driven task 5. update rest of the count columns using multiple data driven tasks 6. use left outer join to insert into the target table by comparing it with the staging table using execute sql task 7. use inner join to update the existing rows against the new data. (sort of incremental loading) using execute sql task If all of this make sense then please suggest is my option correct?
dts
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.