title: Insert non-duplicate data into a table from another table
body: <p>I am trying to insert a non duplicate records into a table but which doing so I am unable to insert it it gives me (0 row(s) affected). And actually the table itself is empty and I am insert new records. To ignore inserting duplicate records I am doing it in the query which I have added below.</p>
  
  <pre><code>Insert Into OrderDetails (CustomerID, CustomerName, OrderID, OrderDate, ProductID, ProductName, Unit, Price)
  SELECT c.CustomerID, c.CustomerName, i.OrderID, i.OrderDate, p.ProductID, p.ProductName, p.Unit, p.Price
  FROM Customers c
  INNER JOIN items i ON c.CustomerID=i.CustomerID
  INNER JOIN itemsDetails id ON i.OrderID = id.OrderID
  INNER JOIN Products P ON p.ProductID = id.ProductID
  Inner Join OrderDetails od ON c.CustomerID = od.CustomerID
  where c.CustomerID != od.CustomerID
  </code></pre>
  
  <p>Am I Inserting correctly?</p>