场景:finereport 做了一个表穿透,页面的一个参数带入下一个表,下面sql是穿透表的查询
select ccuscode,ccusname from customer where ccuscode in ('00550,00264,18020018')
括号里面的字符串要怎么拆?或者是传参时怎么设置?
replace("字符串",",","','")replace("'00550,00264,18020018'",",","','")
这个pp参数就是用的in
and ccuscode in ('${SUBSTITUTE(参数,",","','")}') 自己替换一下子表sql的字段名和参数名再试试
如果是固定的参数就这么写
select ccuscode,ccusname from customer where ccuscode in ('00550','00264','18020018')