Iam using a DTS package:
I have 2 database and 2 tables
I have to insert data from database1 (Table1) to database2(table2)
conditions:
1. I have to get the max(emp_id) from source table(table1) and assign it to a global variable and then use this query:
select * from table1 where emp_id < (global value)
2.Now I have insert this recordset to the table2 of database2
3.Now Delete the dataset from table1 where emp_id<(global variable value)
Now I need to schedule this process since every now and then there will be entry to table1 and i have to insert the dataset till the maximum id value to the table2 and then delete those from table 1.
I used a execute sql task task for passing the global variable.
I have 2 database and 2 tables
I have to insert data from database1 (Table1) to database2(table2)
conditions:
1. I have to get the max(emp_id) from source table(table1) and assign it to a global variable and then use this query:
select * from table1 where emp_id < (global value)
2.Now I have insert this recordset to the table2 of database2
3.Now Delete the dataset from table1 where emp_id<(global variable value)
Now I need to schedule this process since every now and then there will be entry to table1 and i have to insert the dataset till the maximum id value to the table2 and then delete those from table 1.
I used a execute sql task task for passing the global variable.