Hello there!

I've withdrawn the article that use to here, since it was obsolete and related to SQL 2005 and earlier. But you can proceed to the modern version of the article, Dynamic Search Conditions in T-SQL. Unless you really are stuck on those ancient versions, this article will serve you better than the old one.

/Erland