This is how one table/view would look like in an SSIS package:
The Source object is, of course, connected to the Source database's table/view. The other objects beneath it (the Lookup, Destination and Update objects) are all connected to the Destination database's table/view.
The Update object is the only tricky element in this package. I specify the update script manually, which looks like:
UPDATE dbo.MyTableSET Column1 = ?,Column2 = ?,Column3 = ?WHERE ID= ?
(see: Generate SSIS Update script which I use to generate the update script for each table that I have in my SSIS package)
Each "?" will be automatically mapped by the system based on the order you defined it. All you have to do next is to specify the Column Mappings. Make sure that you do it in the right order like the image below:
Note how the ID is specified last -- that's because its corresponding "?" was specified last in the Update statement.

4 comments:
Ack!
UPDATE dbo.MyTable SET
Column1 = ?
,Column2 = ?
,Column3 = ?
WHERE ID= ?
How can I put names to the parameters?
HI AFTER LOOKUP I HAVE USED OLEDB DESTINATION AND DID MAPPING LIKE BELOW http://social.microsoft.com/Forums/getfile/19170/
IS THERE ANY NEED OF UPDATE QUERY ???
Hi, ashuthinks,
You only need the update query if you want to update existing data. If all you want is to insert missing data, then you don't need it at all.
Post a Comment