title: SQL Server : multiple WHERE NOT EXISTS clauses
body: <p>I have about 2600 rows in the <code>Load_Charges_IMPORT</code> query that are not being inserted into the <code>Load_Charges</code> query.</p>
  
  <p>I am trying to insure that no duplicate primary key entries are added. The primary key is established in the <code>Load_Charges</code> query as compound key (Charge Description + Charged Amount). No keys are set in the <code>Load_Charges_IMPORT</code> query, and this data is being imported from an excel document. </p>
  
  <p>Can you tell me if there is something wrong with my code and why I am getting a response of <code>0 row(s) affected</code> when I know there are 2600+ rows in <code>Load_Charges_IMPORT</code>.</p>
  
  <pre><code>INSERT INTO Load_Charges
      SELECT *
      FROM Load_Charges_IMPORT
      WHERE 
          NOT EXISTS (SELECT [Load ID]
                      FROM Load_Charges
                      WHERE Load_Charges_IMPORT.[Load ID] = Load_Charges.[Load ID])
          AND NOT EXISTS (SELECT [Charge Description]
                          FROM Load_Charges
                          WHERE Load_Charges_IMPORT.[Charge Description] = Load_Charges.[Charge Description])
          AND NOT EXISTS (SELECT [Charged Amount] 
                          FROM Load_Charges
                          WHERE Load_Charges_IMPORT.[Charged Amount] = Load_Charges.[Charged Amount]);
  </code></pre>