${if(len(upper(产品大类))==0,"","and substr(C.SCCODE,1,1) = '"+substr(产品大类,2,1)+"'" } 上面这种数据集参数没问题,预览的时候要输入参数,但是判断条件不够用, 所以我想把 (当"产品大类"不为零的时候也给加一个if判断)但是预览的时候"产品大类"这个参数就失效了,请问怎么解决 错误的写法如下: ${if(len(upper(产品大类))==0 ,"" ,if(len(upper(产品大类))==2 ,"(and substr(C.SCCODE,1,1) = '"+substr(产品大类,1,1)+"' or substr(C.SCCODE,1,1) = '"+substr(产品大类,2,1)+"')" ,if(len(upper(产品大类))==3 ,"(and substr(C.SCCODE,1,1) = '"+substr(产品大类,1,1)+"' or substr(C.SCCODE,1,2) = '"+substr(产品大类,2,2)+"')" ,if(len(upper(产品大类))==7 ,"(and substr(C.SCCODE,1,1) = '"+substr(产品大类,1,1)+"' or substr(C.SCCODE,1,1) = '"+substr(产品大类,2,1)+"' or substr(C.SCCODE,1,1) = '"+substr(产品大类,3,1)+"' or substr(C.SCCODE,1,2) = '"+substr(产品大类,4,2)+"' or substr(C.SCCODE,1,2) = '"+substr(产品大类,6,2)+"')" ,""} |