Lynda,
You can always do a join to the history table on #loadable and make sure the record count is correct before you do the delete.
Seriously though the backend, I've used this code in both Sybase and SQL Server, works quite well without erroring.
>Wow, I had some real problems with the server timing out on my last post. I'll try to be quicker this time!
>
>Of course, it's much better to do the work on the back end, but how do you know which inserts failed? I'd rather not use an all-or-nothing approach; the job might never get done.