Hi, I have a query in an stored proc that takes a list of selected IDs from the front end, which acts like a filter. I use a varchar containing comma delimited IDs. There should never be more than 100 IDs in the list. If this filter feature is used in the app usually only 5-25 IDs selected. Now my question: is it better practice to parse the string into a temp table then use the temp table in a query, or is it better to construct the query as a string and execute it dynamically. I am using SQL Server 2000 in development, but Production is still SQL Server 7.0. Example: --parse IDs into #userID using CHARINDEX in loop select * from tbl_user where userID in (select * from #userIDs) OR SET @sql = 'select * from tbl_user where userID in (' + @userIDList + ')' EXEC @sql The actual query I am running is much larger and more complex (joins 5 tables), even though I am only filtering on one of the joined tables. Does this make the dynamic SQL option less attractive? Thanks.