using parameters in different connections
I'm struggling to accomplish a task , I have a package with two connections, one oledb (for a local sqlserver base) and a ado.net ( to a remote mysql base) , need to extract the data from mysql base and insert into sql server base .
the number of records is somewhere around 1 million records , then delete everything and bring it all is not a solution .
I've been researching and I think something like save the result of a query ( held in sql server base , for example a " select max (id ) from table ) and send as parameter (" select * from table where id > PARAMETER " ) would be a solution.
Someone can help me with material or an example?

thank you
February 15th, 2015 11:11pm

you can simply do this

select * from table where id > (select max (id ) from table)

provided both tables are in same db or same server different db

Otherwise you need to do it in two steps

1. Have e execute sql task which will execute the below query with connection to first db

select max (id ) AS Maxid from table

Store result in a SSIS variable

2. Have another execute sql task connection to second db and do query like this

select * from table where id > ?

Map parameter0 to earlier variable in parameter mapping tab
Free Windows Admin Tool Kit Click here and download it now
February 16th, 2015 12:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics