Case Statement and Parameters in Query

  • 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

  • rhfishman

    To receive assistance ... please read the first link in my signature box so that those who want to assist you can do so with a tested solution.

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply