I have a Parameter called @Codes passing in an optional comma delimited string of system codes.
If this parameter has a value I want to filter the query with a
WHERE
blah = blah AND
Code IN ('Code1','Code2','etc.')
If the parameter is null or empty I want to omit the last where filter entirely.
Any ideas?