• g.britton (12/9/2014)


    Since SSRS just passes a comma-delimited string, I write my query like this:

    select ...

    from ...

    where column in (@var)

    and either:

    1. put the base query in a view or TVF and add the where clause in SSRS, which substitutes the variable before passing it through to SQL.

    2. assemble the query as a string and execute it dynamically (in a proc).

    There's another option too (depends on the size of the row set):

    3. run the query without the parameters and filter it later in SSRS. Obviously not the best idea if the row set is large.

    +1 on all of that.