Which SQL statement should you use?

You are developing a SQL Server Integration Services (SSIS) package that imports data into a data
warehouse. You add an Execute SQL task to the control flow. The task must execute a simple INSERT
statement. The task has the following requirements:
The INSERT statement must use the value of a stringpackage variable. The variable name is StringVar.
The Execute SQL task must use an OLE DB Connection Manager.
In the Parameter Mapping tab of the Execute SQL task, StringVar has been added as the only parameter. You
must configure the SQLStatement property of the Execute SQL task. Which SQL statement should you use?

You are developing a SQL Server Integration Services (SSIS) package that imports data into a data
warehouse. You add an Execute SQL task to the control flow. The task must execute a simple INSERT
statement. The task has the following requirements:
The INSERT statement must use the value of a stringpackage variable. The variable name is StringVar.
The Execute SQL task must use an OLE DB Connection Manager.
In the Parameter Mapping tab of the Execute SQL task, StringVar has been added as the only parameter. You
must configure the SQLStatement property of the Execute SQL task. Which SQL statement should you use?

A.
INSERT INTO dbo.Table (variablevalue) VALUES ($Project::StringVar)

B.
INSERT INTO dbo.Table (variablevalue) VALUES (@StringVar)

C.
INSERT INTO dbo.Table (variablevalue) VALUES ($Package::StringVar)

D.
INSERT INTO dbo.Table (variablevalue) VALUES (?)

Explanation:
According to these references, this answer looks correct.
References:
http://msdn.microsoft.com/en-us/library/ms141003.aspx
http://msdn.microsoft.com/en-us/library/ms140355.aspx
http://msdn.microsoft.com/en-us/library/cc280502.aspx



Leave a Reply 0

Your email address will not be published. Required fields are marked *