title: Update a flag/column value with no and set counter to create files in small chunks
body: <p>I have total 60 .txt files that i am trying process and generate 1 output flat file using SSIS package. Those 60 .txt file are loaded in the table.</p>
  
  <p>Now the outputfile will be too big. So I'm trying to divide this file into chunck of 6. So when my ssis package runs, 10 files will process and create 1</p>
  
  <p>output file and again run the ssis package and generate another file. Total will be 6 files.</p>
  
  <p>I have SQL Task  which get those distinct files name in SSIS package and then process. There is one column names <code>JobDone</code> which I'm treating as a flag.</p>
  
  <pre><code>SELECT DISTINCT FileName FROM Table A WHERE JobDone IS NULL
  </code></pre>
  
  <p>I have declared column name in <strong>Table A as => Bit null</strong>, so SSIS package picks up all files with <code>JobDone</code> value is <code>NULL</code></p>
  
  <p>By this above SQL Statement it is going to pick up all those 60 files. Now I want to pick up only 10 files at a time.  I want to update a flag with some no for e.g. 7 with
  those 50 files so when my SSIS package runs , it going to take only 10 files. </p>
  
  <p>Once that 10 files process is done in SSIS, want to update flag of <code>JobDone</code> to <code>NUL</code>L for 10 more files from those 50 files and those 10 files will run, now 40 remaining. Then again I want to update flag as <code>NULL</code> for 10 more files and run SSIS pacakge. Till all files being processed and 6 outfile get generate. </p>
  
  <p>Any help will be appreciated. 
  Thanks in advance. </p>