WITH SUBVEN1 AS (SELECT DISTINCT MATERIAL_NO,SUPPLIER_CODEFROM SUBMAT_VENDORWHERE INTERFACE_FILE_NAME = INF_FILE_NAME_ERRAND MATERIAL_NO IS NOT NULL), CHECKDUP AS (SELECT MATERIAL_NO,SUPPLIER_CODE, count(1) over (partition by MATERIAL_NO) AS sFROM SUBVEN1)SELECT *FROM CHECKDUPWHERE s = 1;
ไม่มีความคิดเห็น:
แสดงความคิดเห็น