I have a SQL Server Integration Services project which queries a SQL Server 2005 database using an OLE DB Source with SQL Command as data access mode.
I’m trying to parametrize my SQL query but the syntax is not @PARAM and when I try to use ? and click on the parameters I get an error saying that “Parameters cannot be extracted from the SQL Command.”
I’m doing something like
SELECT * FROM [dbo].[TabledValuedFunction] (?)
It looks like the OLEDB connection doesn’t supply SSIS with everything that it needs to determine the parameter data type, etc. so it can’t properly parse out what it should be (this is conjecture on my part). As the error message suggests though, you can make the whole SQL command come from a variable. You’ll need a string variable which you set previous to the Data Flow.