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

前端 未结 10 2015
被撕碎了的回忆
被撕碎了的回忆 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:25

        case when first_condition
          then first_condition_result_true
        else
          case when second_condition 
            then second_condition_result_true
          else
              second_condition_result_false                              
          end
        end
      end as qty
    

提交回复
热议问题