title: Remove second line or the same number in SQL Server
body: <p>I'm using SQL Server. And I used this code:</p>
  
  <pre><code> select distinct A.CustomerNo, A.INV_Nr, B.Code, A.Price 
   from INVOICE A.
        INVOICE_LINE B
   where
        A.IVC_Nr = B.IVC_Nr
  </code></pre>
  
  <p>The output is like this:</p>
  
  <pre><code>| CustomerNo   |    INV_Nr   |   Code   | Price |
  =================================================
  | 1100021      |    500897   |   1404   | 2500  |
  | 1100021      |    500897   |   1403   | 2500  |
  | 1100022      |    500898   |   1405   | 3500  |
  | 1100023      |    500899   |   1405   | 3000  |
  | 1100023      |    500899   |   1403   | 3000  |
  </code></pre>
  
  <p>How can I remove the second line and get only the 1st line of the same number and should be like this:</p>
  
  <pre><code>| CustomerNo   |    INV_Nr   |   Code   | Price |
  =================================================
  | 1100021      |    500897   |   1404   | 2500  |
  | 1100022      |    500898   |   1405   | 3500  |
  | 1100023      |    500899   |   1405   | 3000  |
  </code></pre>
  
  <p>Thanks,</p>