>>Did you really understand my code example. It does not create a temp table, but the function returns a table from the input parameter that can be used directly in the call > >What is dbo.udf_list2table?
It's a custom function that splits comma-delimited list into a table. You can find lots of other good variations of these functions at these blogs