SSIS- Set Multiple variables via a single SQL task

后端 未结 3 707
-上瘾入骨i
-上瘾入骨i 2021-02-09 07:21

I\'m trying to set multiple variables to the result of an SQL Query that returns a single row with multiple columns. The SQL statement is in the format of:

SELEC         


        
3条回答
  •  死守一世寂寞
    2021-02-09 07:45

    I found a solution to this by using mapping the result sets as a zero-based ordinal set. E.g. under 'Result Set' in the task properties:

    result name   |   variable name
    -------------------------------
         0        |       a
         1        |       b
         3        |       c
         4        |       d
    

    This method allows me to keep my SQL statement unaltered also.

提交回复
热议问题