I would like to pass a string parameter into a stored procedure that will do the following
Select blah blah blah subquery1 as blah1, subquery 2 as blah2.... (Long drawn out select query) from Table1 WHERE
Division = @param1 AND ....
if @Assignment = 'Unassigned' then the where clause should be AssignedTo = '-1'
if @Assignment = 'Assigned' then the where clause should be AssignedTo <> '-1'
if @Assignment = 'All' then skip this part of the where clause.
Thanks in advance.