• Why don't you just use a conditional split with a left outer join to the table holding the primary key. Check for NOT NULL of the PK value and perform the insert.

    Do whatever needs to be done with the rows not matching the PK.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]