title: Inner join without duplicate values from the left table?
body: <p>I'm working with SQL Server, and I have 2 tables: <code>Invoice</code> and <code>InvoiceService</code>.</p>
  
  <p><strong>Invoice</strong>:</p>
  
  <pre><code>InvoiceID      InvoiceDate     InvoicePrice     InvoicePaidAmount  PatientID
  ----------------------------------------------------------------------------
  1               01-01-2016        50                 30              1
  2               01-02-2016       100                100              2 
  </code></pre>
  
  <p><strong>InvoiceService</strong>:</p>
  
  <pre><code>ID     InvoiceID     ServiceName     ServicePrice
  -------------------------------------------------
  1          1         Dermato             20
  2          1         ophthalmo           30
  3          2         General            100
  </code></pre>
  
  <p>My query:</p>
  
  <pre><code>select 
      ServiceName, ServicePrice, InvoiceID, InvoicePrice,
      InvoicePaidAmount, PatientID   
  from 
      InvoiceService
  inner join 
      Invoice on Invoice.InvoiceID = InvoiceService.InvoiceID
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>ServiceName  ServicePrice InvoiceID  InvoicePrice InvoicePaidAmount PatientID 
  
  Dermato      20            1            50            30               1
  ophthalmo    30            1            50            30               1
  General      100           2            100           100              2
  </code></pre>
  
  <p>I need  to get non duplicate values from the left table  :
  when an invoice  has more than 1 service I want that the invoice price and InvoicePaidAmount don't be repeated like this example:</p>
  
  <pre><code>ServiceName  ServicePrice InvoiceID  InvoicePrice InvoicePaidAmount PatientID 
  
  Dermato      20            1            50            30               1
  ophthalmo    30            1            0             0                1
  General      100           2            100           100              2
  </code></pre>