Z4u3z1 回复 yzm187086(提问者)SELECT T1.NAME 劳保用品,T1.MODEL,T1.ITEM_NUMBER,T1.CLAIM_TIME,T1.DIS_DEPART,T2.NAME 部门 FROM HSE.SES_GI_OUT_PER_STANDINGS T1,HSE.BASE_DEPARTMENT T2 WHERE T1.NAME LIKE\'%${NAME}%\' AND T1.MODEL LIKE\'%${TYPE}%\' AND T2.NAME in (\'${REPLACE(DEPART,\",\",\"\',\'\")}\') AND to_char(T1.CLAIM_TIME,\'yyyy-mm-dd\')>=\'${StartDate}\' AND to_char(T1.CLAIM_TIME,\'yyyy-mm-dd\')<=\'${EndDate}\' AND T1.VALID=\'1\' AND T1.DIS_DEPART=T2.ID