I am converting a DTS update lookup to an SSIS lookup with an update query. So far it doesn't seem to work.
OLD DTS ACTIVE X CODE:
value = DTSLookups("apple").Execute(DTSSource("ID2"))
SQL Query in DTS:
UPDATE TABLE1 SET STAMP="TEST" WHERE (ID = ?)
In SSIS:
Create a lookup, use same above query, and I get an error if I click on column: "Parameter information cannot be derived from SQL statements. Set parameter information before preparing command"
IS there anyway to accomplish this in SSIS with a lookup? Or is there a better way?
To perform updates in SSIS, you will want to look at the OLE DB transformation as it will allow you to do the update as expected.
You however don't want to use OLE DB transformation as it will fire off singleton update statements for every bloody row flowing through a dataflow and your performance will be abysmal. Instead, for all the rows needed updated, use a conditional split and redirect them into a staging table. After the dataflow, wire up an execute SQL task to perform a mass update of all the rows that need to be fixed. Your database will thank you. Andy Leonard is a great resource to start with, here's an article he did that describes his incremental load pattern