>Thanks Sergey,
>
>All excellent questions. I altered my approach and made the ISBN13 a unique index and I am attempting an insert first and only doing the update when an error is fired. After making this change the process went from 10 days to 5 hours for 4,000,000 records.
>
>BTW I corrected the error in the directory reference. I agree a stored procedure would be superior, since this is a 1 shot I figured quick and dirty, just not this dirty.
>
Have you looked at doing a bulk insert instead? This can be A LOT faster for loading data. You can download the current Sedna release and use the BulkXMLLoad.PRG that's part of the upsizing wizard. I'm not sure if it'll work with SQL Server 2000, but it's worth a try (even if it isn't, there are other ways you can bulk load data). You may need to install the SQMLXML4 component (It's named SQLXML4.MSI and should be on the SQL Install CD/DVD, assuming it's the same as SQL Server 2005).