title: SQL Server Bulk Insert Ingore or skip last row
body: <p>I'm using a bulk insert script to import a number of flat files into SQL Server </p>
  
  <p>A few files end with </p>
  
  <pre><code>-----------------------------------
  </code></pre>
  
  <p>So what I want to do is or skip last row(s) or remove <code>------------------</code> in the bulk insert. Is one of these options possible?</p>
  
  <pre><code>SET @s = N'BULK INSERT ' + @t + '
             FROM ''' + @f + '''
             WITH (FIELDTERMINATOR = ''|'',
                   ROWTERMINATOR = ''0x0a'',
                   FIRSTROW=2)  '
  </code></pre>
  
  <p><code>lastrow = 1</code> doesn't work</p>