Friday, December 05, 2008

Add Parameter Mapping in SQL Execute Task

Let’s say if you want to execute a query in the SQL Execute Task to delete the products number = ‘AR-5381’ and color = ‘blue’ and you want to pass the value from the variables, the query as below:

DELETE FROM dbo.Product WHERE ProductNumber = ? AND Color = ?

You will need to setup the parameter mapping, in order to make it query work, you will to enter the number starting from 0 in the parameter name column. There is two parameter here, so the parameter name will be 0 and 1

0 comments: