用户登录
用户注册

分享至

如何使用 >= sql case 语句中的条件?

  • 作者: 回头123240083
  • 来源: 51数据库
  • 2022-12-30

问题描述

我试图在语句中放置一个 >= 条件,但它不允许这个条件.

I am trying to place a >= condition in statement, but it is not allowing this condition.

case 
   when ct.CRS_CAREER_LVL_CD = 'G' then 'Graduate '
   when ct.CRS_CAREER_LVL_CD = 'L'  then 'Law '
   when convert(int, left(ct.CRS_CATLG_NO, 4) > = 99 then 'Upper Division' 
   else 'Lower Division'
end as courseLevelName

有没有其他方法可以做到这一点?

Is there any other way to do this ?

推荐答案

 when convert(int,left(ct.CRS_CATLG_NO,4)
             ^        ^                 ^           ^
            OPEN     OPEN              CLOSE      CLOSE ? 
软件
前端设计
程序设计
Java相关