loop thru columns and find isExecute =1 and loop the name column in dataflow tasks

已答复 loop thru columns and find isExecute =1 and loop the name column in dataflow tasks

  • Tuesday, November 27, 2012 6:26 AM
     
     


    I have table with record isExecute = 1 and 0 value.

    I need to get the columns isExecute =1 and loop the name column into my set of data flow tasks


    ShanmugaRaj

All Replies

  • Tuesday, November 27, 2012 6:42 AM
     
      Has Code

    Not sure what your requirements are, but you could execute a query with the following WHERE clause in an Execute SQL Task:

    ... WHERE isExecute = 1;

    Store the results in an object variable and loop over them using a For Each Loop container.


    MCSA SQL Server 2012 - Please mark posts as answered where appropriate.

  • Tuesday, November 27, 2012 6:59 AM
     
     

    By using the execute sql statement, i will get say 3 records.

    I want to now use those records in my for each loop by getting column1, column2 values from the query result


    ShanmugaRaj

  • Tuesday, November 27, 2012 7:02 AM
     
     Answered

    This article explains it all:

    Loop through ADO recordset in SSIS


    MCSA SQL Server 2012 - Please mark posts as answered where appropriate.

    • Marked As Answer by ShanmugaRaj Tuesday, November 27, 2012 7:11 AM
    •