I want to be able to pass in a list of parameters, and ignore the ones which are NULL. So that the query is in effect pretending that the filter isn\'t there and ignoring it
I generally use
WHERE (id = @id OR @id IS NULL) AND (num = @num OR @num IS NULL)
etc.