DELETE FROM DC2.OR_100 WHERE PV_USER = '676';
commit;
INSERT INTO DC2.OR_100 (PV_KEY,PV_USER,PV1)
SELECT LPAD(TO_CHAR(ROWNUM),20,0),TABLE_SELECT.* FROM (
SELECT '676',COUNT(*)
FROM
 ILS_SEIKYU.H_BILL@ILS_SEIKYU T001
,ILS_SEIKYU.M_CUST@ILS_SEIKYU T002
WHERE
 T001.CUSTCode=T002.CUSTCode(+)
 AND T001.BILLDate BETWEEN '20180401' AND '20190331'
) TABLE_SELECT
;
commit;
EXIT;


