Home Forums Data Warehousing Integration Services how to read contents of flat file in SSIS and extract from it just one value for use in variable? RE: how to read contents of flat file in SSIS and extract from it just one value for use in variable?

  • KoldCoffee (1/13/2015)


    From the attached txt file, I need to be able to extract the rowcount for the file having the name '2014-06-20_1403294747_settings_placement.txt.zip' and place it into a variable but I don't know how to write the script for the script tasktransformation.

    Can someone look at the attached txt file and share with me a C# script that will do the equivalent of the below sql?

    select rows from <manifest.txt> where file like '%settings_placement%'

    Is the filename of "manifest.txt" constant? Also, where is this file? On your desktop box, on the SQL Server, or on some other box? You certainly don't need to learn a whole new bloody language for this simple task.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)