Single row, multiple columns to variables in SSIS

The SQL Execute task in SSIS allows you to execute a SQL that would return a single row with multiple columns and then map these columns to variables within the package. To do this,

  1. In the General section set the Resultset property to “Single row”.
  2. Set the SQL statement.
  3. In the Result Set section, set the Result Name to 0 – n and the corresponding variables to be mapped. Ensure that the column order is right. I believe you can also use the column name but haven’t tried that.
Advertisements

One thought on “Single row, multiple columns to variables in SSIS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s