Hi @KlearnSSIS ,
1.Could you please share the example data and sql query?
May I know where do you execute the sql query? In Execute SQL Task or Data Flow Task?
2.Depending on the connection type that the Execute SQL task uses, the syntax of the SQL command uses different parameter markers. For example, the ADO.NET connection manager type requires that the SQL command uses a parameter marker in the format @varParameter, whereas OLE DB connection type requires the question mark (?) parameter marker.
SELECT FirstName, LastName, Title FROM Person.Contact WHERE ContactID = ?
Please refer to Parameters in the Execute SQL Task.
3.The following SQL statement selects rows from the Product table in the AdventureWorks2012 database. The first parameter in the Mappings list maps to the first parameter to the Color column, the second parameter to the Size column.
SELECT Color, Size FROM Production.Product WHERE Color = ? AND Size = ?
Please refer to Using Parameterized SQL Statements.
Best regards,
Mona
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.