I have multiple UPDATE statements inside my ExecuteSQL Task. Each one is dependent on one Vairiable e.g. MyId
Do i need to have as many parameters as my Update Statements are OR there is a way to Have
Answers
Try this:
UPDATE TABLE_A SET COL_A={Something} WHERE ID=?
UPDATE TABLE_B SET COL_B={SomeTHing} WHERE ID=?
This Query takes MyId Variable as Parameter. Do i need to have as many parameters as my Update Statements are OR there is a way to Have
one
shared parameter defined inside my ExecuteSQL TaskAnswers
Try this:
DECLARE @id int
SELECT @id = ?
UPDATE TABLE_A SET COL_A={Something} WHERE ID=@id
UPDATE TABLE_B SET COL_B={Something} WHERE ID=@id
No comments:
Post a Comment