July 30, 2010 at 7:54 am
Hi All ,
I am looking for an answer to my update query .
I have a .csv file as a source . I have already populated my destination table . Now , based on some conditions i want to update the dest. table.
For ex. I have a Empcode column as a pri. key column. I want to check these values with the values coming from flat file source . If the value matches then only update the other two columns of the table else do nothing .
I tried this with lookup and conditional split ,but not working . Am i correct or missing something or is there another way of doing this like using Sql task .
Any help would be much appreciated .
Thanks
🙂
July 30, 2010 at 8:06 am
you will have to use a lookup to find the matching entries and then map the Lookup Match Output to OLE DB Command transformation Task to update values passing the update columns as parameters like
update TableName
SET columName = ?, Colum2 = ?
WHERE LookUpColumn = ?
and in the next tab, map these parameters correctly in same order
July 30, 2010 at 8:45 am
Thanks
But the updated values should also come from flat file .
Means if the primary column matches then update 2nd column of the table with values from flat file .
Is it possible here ?
How to get those columns in Lookup?
July 30, 2010 at 12:59 pm
In look up you have Columns Tab where you map the Lookup Columns and also select the desired output columns where you can select the columns to be updated..
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply