我正在尝试查找2个不同col范围内的值。 下面是我的表的结构:
OBJECT FIELD LOW HIGH
----------------------------
S_IDOCMONI ACTVT 01 03
我想在列LOW和HIGH之间搜索值01、02和03。目前,我只写了一个CASE语句来检查col LOW:
select *
into [abc]
from
(select
*,
case
when [OBJECT] = 'S_IDOCCTRL' and [FIELD] = 'ACTVT' and [LOW] in ('01')
then '1'
end [Subgroup]
from
[user-master]) as x
where
subgroup is not null
任何人都可以帮助我在哪里搜索值02(在LOW和HIGH之间的范围)