Home Forums SQL Server 7,2000 General Problem with "Ingore duplicates" index option RE: Problem with "Ingore duplicates" index option

  • "I could insert a batch of records into with the hope that SQLSvr would insert records that didn't already exist in Table1 and ingore (not insert) any that already did exist in Table1."

    I don't think it is good to enable 'Ignore duplicates' in unique key. In your case, you can achieve it by try

    INSERT INTO [123.12.13.34].database1.dbo.Table1

    SELECT e.*

       from Table2 a 

        join Table3 b

         on a.order_num = b.order_num

     where a.order_num not in (select order_number from [123.12.13.34].database1.dbo.Table1 )