SSIS Variables

  • I have a task that builds an SQL statement to be used to get data from an INFORMIX database.I place the sql statment that I built into a variable I would like to use at a later step in my package

    When its time for me to use the variable to retrieve the data, I create a data flow task and want to use the variable with the newly created SQL statement. But in the ADO NET Source sources there is no where I can point to the variable that contans the sql.

    Anyway for me to use my variable that contains an SQL statemet to retrieve data from an informix database?

    Truly Im trying to recreate the Dynamic Properties task from DTS.

  • Yes, you can do this through the "back door" of property expressions. In this case (inside the Data Flow) it isn't particularly pretty, but it works.

    Open your Data Flow, then select the BACKGROUND. (Alternatively, you can go to the Control Flow and select the Data Flow Task - same thing.) Go to the properties window (F4), and find the Expressions property. Expand it, and hit the ellipsis button (...). Pull down the list of properties until you find your [ADONetSource].[SqlCommand] property - which may be named differently if you've renamed your component. Once there, you can launch the property editor and place your variable name in the expression - press "test" (or whatever the button's called) to ensure you get your statement to show up.

    Todd McDermid - SQL Server MVP, MCSD.Net, MCTS (SQL08BI)
    Find great SSIS extensions - most are open source - at SSIS Community Tasks and Components[/url]
    Are you doing Data Warehouse ETL with SSIS? Don't use the slow SCD Wizard, use the Kimball Method SCD component instead.

  • This worked GREAT, thank you thank thank you

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

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