How do I do multiple CASE WHEN conditions using SQL Server 2008?

前端 未结 10 2011
被撕碎了的回忆
被撕碎了的回忆 2020-11-27 09:57

What I\'m trying to do is use more than one CASE WHEN condition for the same column.

Here is my code for the query:

   SELECT   Url=\'\',
                    


        
10条回答
  •  情话喂你
    2020-11-27 10:27

    case 
        when a.REASONID in ('02','03','04','05','06') then
            case b.CALSOC 
                when '1' then 'yes' 
                when '2' then 'no' 
                else 'no' 
            end
        else 'no' 
    end 
    

提交回复
热议问题