110,825
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
select
sjmc,
jsdw,
ssdw,
htrq,
sjtjrq,
sjjsgq,
xmjl,
sjjj,
(case when sjjd = 1 then '决策阶段'
when sjjd = 2 then '实施阶段'
when sjjd = 3 then '使用阶段' else '' end) as sjjdmc,
sjjd
from public.case_constructimpl
where sjjd in(
replace(replace(replace('["1","2"]','[',''),']',''), '"','''')
)
而 where sjjd in ('1','2') 就可以查出来 用的Gauss数据库
和数据库没什么关系,where sjjd in ('1','2') 能查出来是因为那个两个字符串,用逗号隔开了,
replace(replace(replace('["1","2"]','[',''),']',''), '"','''') 的结果是一个字符串,字符串里有一个逗号,
伪代码解释的话就是 select ...... from public.case_constructimpl where sjjd in ( “ '1','2' “), 但你数据库里显然没有sjjd为 '1','2' 的数据
学习存储过程以及动态存储过程正当时