• The best solution would be to get rid of c.u.r.s.o.r. *cough* in the first place.

    Insert all data into lpn at once and use the OUTPUT clause to get the returned identity values. Then perform a singel update to the Addresses table for all AccountID's at once.



    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]