Menu Close

Insert Variable value from SSIS package to SQL table

If you are trying to insert SSIS variable values into a SQL table here is one way of doing this:

1. Create “Execute SQL Task”

2. Under General on the left hand side panel enter the following to SQLStatement:

CREATE TABLE dbo.myTable (
[variable1] [varchar](100) NULL,
[variable2] [varchar](100) NULL

INSERT INTO myTable(variable1,variable2) values(?, ?)

3. Under Parameter Mapping on the left hand side panel add the 2 variables under Variable Name. Direction should be set to Input on both. Data Type would be VARCHAR. Parameter Name should be 0 for the first variable and 1 for the second one. Parameter Size should be set to -1 on all