大佬,求助,开发驱动因素是多选项,一般为:0,1或1或1,3 但是我现在设置的是单选,所以会报错,sql不太行,如果改成多选
select
lastname 申请人,
case when kfqdys = 0 then '新产品开发'
when kfqdys = 1 then '质量提升'
when kfqdys = 2 then '成本优化'
else '提升交付能力'
end as 开发驱动因素
from excel1
、
你这个单选不会报错。多选才会报错的呀。
现在你的这个语句不会报错,你没有传入参数
case when kfqdys = '0' then '新产品开发'
when kfqdys = '1' then '质量提升'
when kfqdys = '2' then '成本优化'
where 1=1
and kfqdys in('${cs}')
设置复选框的分隔符号为,
复选框的实际值用数字。显示值 用你上面判断后的
https://help.fanruan.com/finereport/doc-view-1287.html 参考文档
SELECT * from (
case when kfqdys =0 then'新产品开发'
when kfqdys = 1 then '质里提升'
when kfqdys =2 then '成本优化'
else'提升交付能力'
) a
WHERE 开发驱动因素 in (1,2)
with tab as (
else '提升交付能力' end as 开发驱动因素
)
申请人,
开发驱动因素
from tab
where 开发驱动因素 in '${参数名称}'