locked
Boolean Parameters RRS feed

  • Question

  • Hi All,

     Can I rename the Boolean Parameters from "Yes" or "No" to Any other naming Conversions?

    For Ex : "Male" or "Female"

    Thanks in Advance.

    Pradeep

    Tuesday, February 10, 2015 9:07 AM

Answers

  • Unfortunately not.  The Boolean parameter is not flexible at all. Your best option is to go for a Text parameter with a value and a label, you can use a query as source:

    select 1 val, 'Female' lbl
    union all
    select 2, 'Male'



    SQL Server MVP, MCITP/MCTS SQL Server 2008
    Check out my articles at BI: Beer Intelligence

    Tuesday, February 10, 2015 9:14 AM

All replies

  • Unfortunately not.  The Boolean parameter is not flexible at all. Your best option is to go for a Text parameter with a value and a label, you can use a query as source:

    select 1 val, 'Female' lbl
    union all
    select 2, 'Male'



    SQL Server MVP, MCITP/MCTS SQL Server 2008
    Check out my articles at BI: Beer Intelligence

    Tuesday, February 10, 2015 9:14 AM
  • You can do so in SELECT:

    select name, sex = case sex

    when 1  than 'male'

    when 2 then 'female'

    end

    from MyTable

    Tuesday, February 10, 2015 9:24 AM