Hi, Charles,
In addition to what others have said (and thanks for the plug, Mike!), a question....I noticed you posted this under SQL 2005. Assuming that's what you're using....there's yet another approach that's even better....it assumes that you can pass your selections as XML. If you're able to pass your selections as XML, you can take advantage of the new XQUERY functions in T-SQL 2005.
I wrote about it last year, here's a link:
http://www.code-magazine.com/article.aspx?quickid=0703041&page=4Basically I provide a reusable UDF that shreds an XML string into a table variable that you can use in any subsequent JOIN. So you just need to populate an XML string with your selections.
Hope that helps...
Kevin