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

Comments

# SSIS: Execute SQL Task params @ Wednesday, October 05, 2005 6:09 PM

Kirk has made a really useful reference post (here: http://sqljunkies.com/WebLog/knight_reign/archive/2005/10/05/17016.aspx)...

Anonymous

# Jamie Thomson - SSIS: Execute SQL Task params @ Thursday, October 06, 2005 1:34 AM

Anonymous

# re: SQL Task parameters @ Thursday, October 13, 2005 5:08 AM

merci beaucoup

katherine gache

# re: SQL Task parameters @ Friday, November 11, 2005 7:37 PM

Kirk,
Thanks for your help when you came into the office... But I'm curious: How do you pass a stored procedure and an input parameter to it?
Can I use a "?" as the placeholder?
Any help would be great!

KeithW

# SSIS: Using dynamic SQL in an OLE DB Source component @ Friday, December 09, 2005 5:18 AM

I reckon that one of the most commonly used components in SSIS is the OLE DB Source component. This is...

Anonymous

# SSIS: Using dynamic SQL in an OLE DB Source component @ Monday, January 08, 2007 9:39 AM

I reckon that one of the most commonly used components in SSIS is the OLE DB Source component . This

Anonymous

# SSIS: Execute SQL Task params @ Tuesday, January 16, 2007 1:14 PM

Kirk has made a really useful reference post (here: http://sqljunkies.com/WebLog/knight_reign/archive/2005/10/05/17016.aspx

Anonymous