title: Decrease the output of bcp export
body: <p>In our project we are using bcp command to export about million of rows and logging the output to an output file.
  For bcp import I can control the output of <code>bcp</code> command by using the <code>-b</code> switch which specifies the no. of rows to be imported in a batch. The output which is something like this :</p>
  
  <pre><code>Starting copy...
  1000 rows sent to SQL Server. Total sent: 1000
  1000 rows sent to SQL Server. Total sent: 2000
  1000 rows sent to SQL Server. Total sent: 3000
  1000 rows sent to SQL Server. Total sent: 4000
  1000 rows sent to SQL Server. Total sent: 5000
  1000 rows sent to SQL Server. Total sent: 6000
  1000 rows sent to SQL Server. Total sent: 7000
  1000 rows sent to SQL Server. Total sent: 8000
  1000 rows sent to SQL Server. Total sent: 9000
  1000 rows sent to SQL Server. Total sent: 10000
  1000 rows sent to SQL Server. Total sent: 11000
  1000 rows sent to SQL Server. Total sent: 12000
  SQLState = 22001, NativeError = 0
  </code></pre>
  
  <p>can easily be reduced by increasing the number sent with <code>-b</code> switch :</p>
  
  <pre><code>Starting copy...
  10000 rows sent to SQL Server. Total sent: 10000
  SQLState = 22001, NativeError = 0
  
  12406 rows copied.
  Network packet size (bytes): 4096
  Clock Time (ms.) Total     : 75     Average : (165413.3 rows per sec.)
  </code></pre>
  
  <p>But for bcp export I can't control the output and for a million rows the log becomes too big, For eg. the below command</p>
  
  <pre><code>bcp  Temp.dbo.TestTable out outdata.txt -t , -f file.fmt -S Server -U user-P password -m 10
  </code></pre>
  
  <p>outputs this :</p>
  
  <pre><code>Starting copy...
  1000 rows successfully bulk-copied to host-file. Total received: 1000
  SQLState = S1000, NativeError = 0
  Error = [Microsoft][ODBC Driver 11 for SQL Server]Warning: BCP import with a format file will convert empty strings in delimited columns to NULL.
  1000 rows successfully bulk-copied to host-file. Total received: 2000
  1000 rows successfully bulk-copied to host-file. Total received: 3000
  1000 rows successfully bulk-copied to host-file. Total received: 4000
  1000 rows successfully bulk-copied to host-file. Total received: 5000
  1000 rows successfully bulk-copied to host-file. Total received: 6000
  1000 rows successfully bulk-copied to host-file. Total received: 7000
  1000 rows successfully bulk-copied to host-file. Total received: 8000
  1000 rows successfully bulk-copied to host-file. Total received: 9000
  1000 rows successfully bulk-copied to host-file. Total received: 10000
  1000 rows successfully bulk-copied to host-file. Total received: 11000
  1000 rows successfully bulk-copied to host-file. Total received: 12000
  1000 rows successfully bulk-copied to host-file. Total received: 13000
  1000 rows successfully bulk-copied to host-file. Total received: 14000
  1000 rows successfully bulk-copied to host-file. Total received: 15000
  1000 rows successfully bulk-copied to host-file. Total received: 16000
  1000 rows successfully bulk-copied to host-file. Total received: 17000
  1000 rows successfully bulk-copied to host-file. Total received: 18000
  1000 rows successfully bulk-copied to host-file. Total received: 19000
  1000 rows successfully bulk-copied to host-file. Total received: 20000
  1000 rows successfully bulk-copied to host-file. Total received: 21000
  1000 rows successfully bulk-copied to host-file. Total received: 22000
  </code></pre>
  
  <p>I have tried passing <code>-b</code> switch with <code>bcp out</code> but it always exports them in batch of 1000 and filtering the rows by <code>greping</code> or <code>seding</code> them will take too much time. 
  Thanks for your help.</p>