Kevin,
I am getting really good performance parsing apart the PKs and stuffing them into a single-column table. I just found it tricky to get the syntax to work because I thought that I could use the table variable name the same way I could use a regular or temp table name, but I sorted that out.
Thanks,
David
>David,
>
>You could try a table variable (and I see Sergey just said that as well) in step #2, assuming you're using sql 2000
>
>
>DECLARE @customerIDTable TABLE (customerID int)
>
>
>Keep in mind the size of the string/varchar that you're parsing (if you wind up storing a large number of PKs in the string)
>
>Kevin
David S. Alexander
Kettley Publishing
20271 SW Birch Street, 2nd Floor
Newport Beach, CA 92660-1752