我试图用案例来改变我在 where 子句中检查的值,但我得到了错误:
关键字“CASE”附近的语法不正确
SQL 服务器 2005
select *
from table
where ((CASE when adsl_order_id like '95037%'
then select '000000'+substring(adsl_order_id,6,6)
ELSE select adsl_order_id
END)
not in (select mwebID from tmp_csv_dawis_bruger0105)