gmrose (10/21/2010)
Thank you again to Lutz and Wayne. I updated my script per Lutz' suggestions to use table #tmpChecks instead of table variable @tmpChecks. I made some minor adjustments to exclude about 100,000 unneeded rows. Now the script runs as desired.For timing, yesterday's script ran for over 23 hours and was less than 5% complete when I halted it. Today's script succussfully completed in less than 4 minutes. That's what I call a real improvement.
gmrose
Yes, this is indeed a real improvement. Out of curiosity, how many records are you processing? And did you try out the script that I posted?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes