posted on Wednesday, October 05, 2005 5:25 PM
by
Knight_Reign
SQL Task parameters
Folks have been asking about this a lot, so here is a quick reference:
Connection Managers and Substitution Parameters for Queries
|
Connection Manager Type |
Parameter
Marker |
Parameter Name |
Example Query |
Example Parameter Name |
|
OLEDB |
? |
0
1 … |
SELECT Name FROM People
WHERE Name LIKE ? |
0 |
|
ADO.Net |
@Varname |
@Varname |
SELECT Name FROM people
WHERE Name LIKE @Name |
@Name |
|
ADO |
? |
@Param1
@Param2 … |
SELECT Name From People
WHERE Name LIKE ? |
@Param1 |
|
ODBC |
? |
1
2 … |
SELECT Name FROM People WHERE Name Like ? |
1 |
[Update : This grid can now be found on SQLIS.com]
[Update : You might also consider using Property Expressions for building the query instead of replacement parameters. Users have reported that it is simpler]
Universe.Earth.Software.Microsoft.SQLServer.IS.KirkHaselden