title: How to Import Flat File in SSIS with different first Row Header Columns and Appending Headers to each data row
body: <p>I'm trying to load data from a fixed width flat file in SSIS (2008 R2), but the first row contains data that:</p>
  
  <ol>
  <li>Needs to be parsed with different fixed widths than the data below it and</li>
  <li>The parsed data from that first row needs to be appended to each
  item in the data below it, after that data has been separately parsed.</li>
  </ol>
  
  <p>What is the best way to approach this? I'm relatively new to SSIS, so I've tried using a Row Count and a conditional split to separate out the first row, but I'm not sure how to parse the data outside of the Flat file importer.  I've read that using a Script Transform could work, but I don't know what the code should be...  </p>
  
  <p>By way of example, if I had flat data that looks like:</p>
  
  <blockquote>
    <p>Hamilton Beach      20150410    Sunny <Br>
    Bob   Male  Blue Black <Br>
    Bill Male  BrownBrown <Br>
    GeorgeMale  GreenBlonde <Br>
    JackieFemaleGreenBlack <Br>
    Jill FemaleBlue Black</p>
  </blockquote>
  
  <p>It should be in the output table as:</p>
  
  <blockquote>
    <p>Hamilton Beach,    20150410,   Sunny,  Bob,    Male,   Blue,   Black<Br>
    Hamilton Beach,    20150410,   Sunny,  Bill,   Male,   Brown,  Brown<Br>
    Hamilton Beach,    20150410,   Sunny,  George, Male,   Green,  Blonde<Br>
    Hamilton Beach,    20150410,   Sunny,  Jackie, Female, Green,  Black<Br>
    Hamilton Beach,    20150410,   Sunny,  Jill,   Female, Blue,   Black<Br></p>
  </blockquote>