• Hi. I have managed to get it working. The query has been written for a report.

    Let me explain. I was never able to workout how to pass values as a comma separated string so I have a fudge. I have a number of datasets that allow multi-value selection, this is where the IN (@Paremeter) comes in. Example:

    SELECT DISTINCT Type,

    CASE

    WHEN Type = 'T' THEN 'A'

    WHEN Type = 'P' THEN 'B'

    WHEN Type = 'M' THEN 'C'

    WHEN Type = 'B' THEN 'D'

    END AS TypeDescription

    FROM MyTable

    The report parameter allows multi-value selection and values are derived from a query.

    So for my boolean values I have datasets that returns both true and false. The report parameters default to 'True & False'. So the AND clause remains. The user can select 'True' for one parameter then 'False' for the other (or what ever combination they want).

    I hope that makes sense!

    Phil.

    -------------------------------------------------------------------------------------
    A neutron walks into a bar. "I'd like a beer" he says. The bartender promptly serves up a beer. "How much will that be?" asks the neutron. "For you?" replies the bartender, "no charge."

    Two hydrogen atoms walk into a bar. One says, 'I think I've lost an electron.' The other says 'Are you sure?' The first says, 'Yes, I'm positive... '

    Tommy Cooper