Using Execute SQL Parameters



This snippet demonstrates the ExecuteSQL task, specifically using its parameters collection with its SQL query.

published 09.07.12

last updated 09.09.12



<Biml xmlns="">
        <Package Name="Package1" ConstraintMode="Parallel">
                <Variable Name="etlp_BatchId" DataType="Int32" EvaluateAsExpression="false" InheritFromPackageParentConfigurationString="User::etlp_BatchId">0</Variable>
                <Variable Name="etlp_PackageLogId" DataType="Int32">0</Variable>
                <Variable Name="etlp_BatchName" DataType="String">Test Batch</Variable>
                <ExecuteSQL Name="SQL LogPackageEnd">
                    <DirectInput>EXEC etlp.LogPackageEnd ?,?,?</DirectInput>
                        <Parameter Name="0" VariableName="User.etlp_PackageLogId" />
                        <Parameter Name="1" VariableName="User.etlp_BatchId" />
                        <Parameter Name="2" VariableName="User.etlp_EndBatchAudit" />

In an Execute SQL task, the DirectInput SQL query uses the ? character to specify parameters. The query's parameters are then added in the task's Parameters collection.

You are not authorized to comment. A verification email has been sent to your email address. Please verify your account.


There are no comments yet.