I cannot get the following to execute properly in my SSRS report. Any help would be appreciated with respect to optional selecting and sorting in the report query.
WHERE
Case @Option
When 'S' then '(skills.sas_operator IN (@RangeStart))'
Else '(skills.sas_operator Between @RangeStart and @RangeEnd)'
END
ORDER BY Case @SortOption
When 'S' then 'skills.sas_operator, skills.sas_station'
Else 'skills.sas_station,skills.sas_operator '
END