Procedure


DECLARE
    VIN_SIT VARCHAR2(17) := '****************';
BEGIN
    DELETE FROM aaa.fact_INstall_unit WHERE vin=VIN_SIT;
    COMMIT;
    DELETE FROM aaa.ig_prm_activity WHERE vin=VIN_SIT;
    COMMIT;
    DELETE FROM bbb.FACT_INSTALL_UNIT_STG WHERE vin=VIN_SIT;
    COMMIT;
    DELETE FROM bbb.vehicle_invoice_stg t WHERE t.vin=VIN_SIT;
    COMMIT;
    DELETE FROM aaa.vehicle_invoice WHERE vin=VIN_SIT;
    COMMIT;
  Delete From aaa.CDR_FULLLOAD Where vin=VIN_SIT;
  COMMIT;
  Delete From aaa.ONOFF_REQUEST_INFOTAINMT Where request_id in (Select REQUEST_ID From aaa.onoff_request_vehicle Where vin =VIN_SIT);
  COMMIT;
  Delete From aaa.ONOFF_REQUEST Where request_id in (Select REQUEST_ID From aaa.onoff_request_vehicle Where vin =VIN_SIT); 
  COMMIT;
END;

你可能感兴趣的:(Procedure)