Data Flow Task - OLE DB Source missing columns

  • In my SSIS package I have several data flow tasks that are identical except in the OLE DB Source they pull a SQL statement from a variable. All of these tasks work except the one task that uses a stored procedure to construct its result set. When editing the OLE DB Source properties the columns are non existent despite being able to preview the data.

    Has anyone seen this problem and know how to fix it?

    Thanks,

    Ben

  • Hi Ben,

    wondering if you've found an answer yet elsewhere or not?

    I am encountering the same problem.

    Basically if I set my OLEDB Source to be an SQL Command:

    Select * From [myTableName]

    It works... but if I do something like:

    Declare @myVar VarChar(10)

    Set @myVar = 'my'

    Exec('Select * From [' + @myVar + 'TableName]')

    Then I'm missing a few columns in the table... which is very weird indeed...

  • I don't exactly remember how I fixed my problem but I do remember that its metadata sensitive. In your second example you have three commands one to declare the variable, set the variable, and then return a result set. If memory serves me correctly SSIS only processes the first command which is what is causing your problem.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply