SSIS looping trough sysobjects

  • I got so for the table names inside of a ForEach Loop Container bit after that I need the variable(tablename) to compare it on dataflow task...I'm stuck here, can't pass the variable to the dataflow task...any ideas?

  • What kind of DF task?

    Is your DF inside the foreach containter?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I have only one container, duno if that is the right way to do it, but the databases as more then 400 tables to loop trough it

  • Script task inside the foreach loop container

  • nviggiani 99687 (5/16/2014)


    Script task inside the foreach loop container

    K. FWIW - A script task is not a DF task.

    Inside the script task, you need to add your variable to the Readonly or ReadWrite variables list inside the script task properties. The you build your script and access your variables with a statement similar to this

    Dts.Variables["FTPInformation"].Value

    the statements are going to vary depending on whether you select C# or VB.Net as the programming language.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Yes correct...I did that and it's working on MessageBox, my problem is to continue after that I need a dataflow task and I

    cannot pass that variable to the dataflow task ...don't know how...

  • So back to the original questions.

    What kind of data flow task? The data flow is essentially just a container for different kinds of tasks. So what kind of task are you trying to use the variable in?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • The data flow task that I will need to add connections and the tables ( in this case the tables are the variable (@tableName) that I need to pass

    to the data flow where it says " table name or view name variable " OR " SQL command from variable " but it's not taking it

  • What exactly are you trying to do with these 400+ tables through SSIS in a looping manner?

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • I need to compare from Prod to QA and update QA tables

  • I got this doing table by table but too much labor, I need loop trough it

  • See if this article will be of any help.

    http://bisherryli.com/2011/03/06/ssis-pass-a-variable-to-a-ole-db-source-in-a-data-flow/

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 12 posts - 1 through 12 (of 12 total)

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