用户P6K2W9322(提问者) where 1=1
${if((len(from1)=0&&len(to1)=0),\"\",\" and to_char(ERSTELDAT,\'yyyy-mm-dd\') >=\'\" +from1+\"\' and to_char(ERSTELDAT,\'yyyy-mm-dd\') <=\'\"+to1+\"\'\")}
${if((len(date1)=0&&len(date2)=0),\"\",\" and (to_char(ERSTELDAT,\'yyyy-mm-dd\') in (\'\"+date1+\"\',\'\"+date2+\"\')) \")}
${if(len(jyp)=0,\"\",\" and prueflos =\'\"+jyp+\"\'\")}
${if(len(pc)=0,\"\",\" and charg = \'\"+pc+\"\'\")}
and WERK in (\'${gsdm}\')