vectory(提问者) 回复 Z4u3z1 where 1=1
${IF(len(TRIM(brand))==0,\"\",\" AND T1.PRODUCT_BRAND_CODE in (\'\"+TRIM(brand)+\"\') \")}
${IF(len(TRIM(probcate_id))==0,\"\",\" AND T1.PRODUCT_CATEGORY_BIG_CODE in (\'\"+TRIM(probcate_id)+\"\') \")}
${IF(len(TRIM(org_name))==0,\"\",\" AND t1.org_code in (\'\"+TRIM(org_name)+\"\') \")}
${IF(len(TRIM(SERVICE_METHOD_NAME))==0,\"\",\" and SERVICE_METHOD_NAME in (\'\"+TRIM(SERVICE_METHOD_NAME)+\"\') \")}
${IF(len(TRIM(CHANNEL_NAME))==0,\"\",\" and CHANNEL_NAME in (\'\"+TRIM(CHANNEL_NAME)+\"\') \")}
and
to_char(T1.FINISH_TIME,\'yyyy-mm-dd\') between \'${startDate}\'and \'${endDate}\'
vectory(提问者) 回复 花无缺爱吃鱼 where 1=1
${IF(len(TRIM(brand))==0,\"\",\" AND T1.PRODUCT_BRAND_CODE in (\'\"+TRIM(brand)+\"\') \")}
${IF(len(TRIM(probcate_id))==0,\"\",\" AND T1.PRODUCT_CATEGORY_BIG_CODE in (\'\"+TRIM(probcate_id)+\"\') \")}
${IF(len(TRIM(org_name))==0,\"\",\" AND t1.org_code in (\'\"+TRIM(org_name)+\"\') \")}
${IF(len(TRIM(SERVICE_METHOD_NAME))==0,\"\",\" and SERVICE_METHOD_NAME in (\'\"+TRIM(SERVICE_METHOD_NAME)+\"\') \")}
${IF(len(TRIM(CHANNEL_NAME))==0,\"\",\" and CHANNEL_NAME in (\'\"+TRIM(CHANNEL_NAME)+\"\') \")}
and
to_char(T1.FINISH_TIME,\'yyyy-mm-dd\') between \'${startDate}\'and \'${endDate}\'