title: Copy one table into another fails - "Column names in each table must be unique"
body: <p>When I try this:</p>
  
  <pre><code>SELECT * 
  -- INTO DB2.dbo.CustomerOrderLines
  FROM DB1.dbo.CustomerOrderLines 
  INNER JOIN DB1.dbo.CustomerOrders ON DB1.dbo.CustomerOrders.Order_Display_Ref = DB1.dbo.CustomerOrderLines.Order_Display_Ref
  WHERE DB1.dbo.CustomerOrders.Delivered_Date BETWEEN '2009-09-23' and '2009-09-24'
  </code></pre>
  
  <p>it show the rows correctly.</p>
  
  <p>When I try to copy the contents from one table in DB1 into the same table in DB2 (and create it if it does not exist):</p>
  
  <pre><code>SELECT * 
  INTO DB2.dbo.CustomerOrderLines
  FROM DB1.dbo.CustomerOrderLines 
  INNER JOIN DB1.dbo.CustomerOrders ON DB1.dbo.CustomerOrders.Order_Display_Ref = DB1.dbo.CustomerOrderLines.Order_Display_Ref
  WHERE DB1.dbo.CustomerOrders.Delivered_Date BETWEEN '2009-09-23' and '2009-09-24'
  </code></pre>
  
  <p>it fails with</p>
  
  <p>Msg 2705, Level 16, State 3, Line 1
  Column names in each table must be unique. Column name 'Order_Display_Ref' in table 'CustomerOrderLines' is specified more than once.</p>
  
  <p>SELECT * INTO and INSERT INTO SELECT * work fine when copying other tables from one database into another, but they do not use JOINS. </p>
  
  <p>What is my mistake?</p>