Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or replace TRIGGER "OF_OWNER"."DEBUG_AFTER_VEHICLE_UPDATE"
- AFTER UPDATE
- ON VEHICLE
- FOR EACH ROW
- Begin
- if ( upper (nvl (:new.COMPANY_NR, 1)) <> upper (nvl (:old.COMPANY_NR, 1)) or upper (nvl (:new.NUMBERPLATE, 1)) <> upper (nvl(:old.NUMBERPLATE, 1))) THEN
- insert into DEBUG_VEHICLE (
- VEHICLE_ID,
- NEW_VEHICLE_ID,
- VEHICLE_CATEGORY_ID,
- REMOTE_UNIT_ID,
- NEW_REMOTE_UNIT_ID,
- VEHICLE_OWNER_ID,
- NEW_VEHICLE_OWNER_ID,
- PERSON_ID,
- NUMBERPLATE,
- NEW_NUMBERPLATE,
- COMPANY_NR,
- NEW_COMPANY_NR,
- COLOR,
- BRAND,
- MODEL,
- DOOR,
- FUEL,
- TRANSMISSION,
- ENGINESIZE,
- LAST_SERVICE_DATE,
- LAST_SERVICE_KM,
- RU_INSTALL_KM,
- RU_INSTALL_DATE,
- ACTUAL_TRACKING_MODE,
- LM_DATE,
- NEW_LM_DATE,
- LM_NAME,
- NEW_LM_NAME,
- LM_COMMENT,
- CHASSIS_NR,
- LICENCE_PLATE_NR,
- VO_VEHICLE_CATEGORY_ID,
- NEW_VO_VEHICLE_CATEGORY_ID,
- LAST_VEHICLE_DATA_ID,
- LAST_VEHICLE_POSITION_ID,
- CONTRACT_ID,
- LAST_BUT_ONE_VEHICLE_DATA_ID,
- COST_PER_MONTH,
- COST_PER_KM,
- FUEL_PER_100KM,
- FUEL_TYPE_ID,
- FUEL_TANK_CAPACITY,
- SERVICE_PERIOD_KM,
- SERVICE_PERIOD_MONTH,
- TECHNICAL_CONTROL_PERIOD_MONTH,
- TECHNICAL_CONTROL_VALIDITY,
- LICENCE_PLATE_START_DATE,
- IN_SERVICE_DATE,
- OUT_SERVICE_DATE,
- MAX_NBR_PERSONS,
- RU_INSTALL_HR,
- LAST_SERVICE_HR,
- SERVICE_PERIOD_HR,
- VEHICLE_LEGAL_CATEGORY_ID,
- CO2_EMISSION_RATE,
- PRIVATE_USE_ALLOWED,
- PRIVATE_USE_ALLOWED_PERSON_ID,
- OLD_VO_VEHICLE_CATEGORY_ID,
- LAST_USERS_CAT,
- LAST_USERS,
- RU_LM_RG_ADDRESS,
- RU_LM_DATE,
- RU_INSTALL_COMMENT,
- LAST_BADGE_VEHICLE_DATA_ID,
- PND_STATUS_ID,
- ERP_CATEGORY,
- ERP_DEFAULT_DRIVER,
- ERP_COMPANY_CODE,
- BADGE_READER_MODEL,
- CO2_CATEGORY,
- CO2_CATEGORY_DESCRIPTION,
- COST_PER_DAY,
- COST_PER_HR,
- DETAILED_DESCRIPTION,
- ERP_ARTICLE_DESCRIPTION,
- ERP_ARTICLE_NUMBER,
- ERP_COST_CENTER,
- ERP_DRIVER_COMPANY_CODE,
- ERP_EQUIPMENT_NR,
- ERP_EQUIPMENT_TYPE,
- ERP_FLEET_EQUIPMENT_NR,
- ERP_FLEET_STATUS,
- ERP_LOCATION,
- ERP_PERIOD_ORDER,
- ERP_SERIAL_NUMBER,
- ERP_STORE,
- ERP_SYSTEM_STATUS,
- ERP_USAGE,
- ERP_WBS_DESCRIPTION,
- ERP_WBS_POSITION,
- FMS_CABLE_MODEL,
- FUEL_TANK_CARD_NR,
- IS_ON_CALL,
- IS_ON_CALL_CUSTOMER,
- IS_ON_CALL_FROM_DATE,
- IS_ON_CALL_TO_DATE,
- IS_TEMPORARY_CAR,
- LEASING_CODE,
- LEASING_COMPANY,
- MAINTENANCE_PLAN_CODE,
- MOTOR_POWER,
- NIGHT_USE_ALLOWED,
- NUMBERPLATE_DATE,
- OTHER_EQUIPEMENTS,
- OTHER_EQUIPMENTS,
- PLANNED_END_OF_CONTRACT,
- PLANNED_KM_PER_YEAR,
- PLANNED_START_OF_CONTRACT,
- PND_INSTALL_TYPE,
- PND_LAST_DELIVERY_DATE,
- PND_MODEL,
- PND_SERIAL_NR,
- PRIVATE_USE_ALLOWED_FROM_DATE,
- PRIVATE_USE_ALLOWED_TEMP,
- PRIVATE_USE_ALLOWED_TO_DATE,
- STATUS_DESCRIPTION,
- TECHNICAL_CONTROL_DATE,
- VEHICLE_STATUS_ID,
- VEH_FCT,
- WARANTY_EXPIRATION_DATE,
- DO_NOT_INVOICE_IF_NO_DATA,
- VEHICLE_SPEED_TYPE_ID,
- OBU,
- COMPUTE_VEHICLE_ACTIVITY,
- VEHICLE_ECO_PROFILE_ID,
- LAST_CONTAINER_VEHICLE_ID,
- DEFAULT_CONTAINER_VEHICLE_ID,
- ACT_INST_TYPE,
- REQ_INST_TYPE,
- USE_DRIVER_BADGE_EVENT,
- ERP_ARTICLE_DESC_FR,
- ERP_ARTICLE_DESC_UK,
- ERP_INTERNAL_ORDER_NUM,
- TYPE,
- MTM,
- MTM_SLEEP,
- SINGLE_WEIGHT,
- MAX_CHARGE,
- EURONORM,
- TACHOGRAPH,
- TACHOGRAPH_TYPE,
- PERIODIC_MAINTENANCE_PTO_HR,
- BADGE_MEANS_WORK_TIME,
- AVG_DAY_HR,
- AVG_DAY_KM,
- LAST_EQUIPMENT_STORE_PLACE_ID,
- GRAPHICAL_SYMBOL_ID,
- VO_OP_STATUS_ID,
- REAL_OWNER_NAME,
- REAL_OWNER_SHORT_NAME,
- VO_CLASS_TREE_ID,
- LAST_RU_TECHNICAL_STATUS_ID,
- IS_CLONE_OF_VEHICLE_ID,
- LAST_INVENTORY_DATE,
- LAST_INVENTORY_BOX_CHECKED
- ) VALUES (
- :old.VEHICLE_ID,
- :new.VEHICLE_ID,
- :old.VEHICLE_CATEGORY_ID,
- :old.REMOTE_UNIT_ID,
- :new.REMOTE_UNIT_ID,
- :old.VEHICLE_OWNER_ID,
- :new.VEHICLE_OWNER_ID,
- :old.PERSON_ID,
- :old.NUMBERPLATE,
- :new.NUMBERPLATE,
- :old.COMPANY_NR,
- :new.COMPANY_NR,
- :old.COLOR,
- :old.BRAND,
- :old.MODEL,
- :old.DOOR,
- :old.FUEL,
- :old.TRANSMISSION,
- :old.ENGINESIZE,
- :old.LAST_SERVICE_DATE,
- :old.LAST_SERVICE_KM,
- :old.RU_INSTALL_KM,
- :old.RU_INSTALL_DATE,
- :old.ACTUAL_TRACKING_MODE,
- :old.LM_DATE,
- :new.LM_DATE,
- :old.LM_NAME,
- :new.LM_NAME,
- :old.LM_COMMENT,
- :old.CHASSIS_NR,
- :old.LICENCE_PLATE_NR,
- :old.VO_VEHICLE_CATEGORY_ID,
- :new.VO_VEHICLE_CATEGORY_ID,
- :old.LAST_VEHICLE_DATA_ID,
- :old.LAST_VEHICLE_POSITION_ID,
- :old.CONTRACT_ID,
- :old.LAST_BUT_ONE_VEHICLE_DATA_ID,
- :old.COST_PER_MONTH,
- :old.COST_PER_KM,
- :old.FUEL_PER_100KM,
- :old.FUEL_TYPE_ID,
- :old.FUEL_TANK_CAPACITY,
- :old.SERVICE_PERIOD_KM,
- :old.SERVICE_PERIOD_MONTH,
- :old.TECHNICAL_CONTROL_PERIOD_MONTH,
- :old.TECHNICAL_CONTROL_VALIDITY,
- :old.LICENCE_PLATE_START_DATE,
- :old.IN_SERVICE_DATE,
- :old.OUT_SERVICE_DATE,
- :old.MAX_NBR_PERSONS,
- :old.RU_INSTALL_HR,
- :old.LAST_SERVICE_HR,
- :old.SERVICE_PERIOD_HR,
- :old.VEHICLE_LEGAL_CATEGORY_ID,
- :old.CO2_EMISSION_RATE,
- :old.PRIVATE_USE_ALLOWED,
- :old.PRIVATE_USE_ALLOWED_PERSON_ID,
- :old.OLD_VO_VEHICLE_CATEGORY_ID,
- :old.LAST_USERS_CAT,
- :old.LAST_USERS,
- :old.RU_LM_RG_ADDRESS,
- :old.RU_LM_DATE,
- :old.RU_INSTALL_COMMENT,
- :old.LAST_BADGE_VEHICLE_DATA_ID,
- :old.PND_STATUS_ID,
- :old.ERP_CATEGORY,
- :old.ERP_DEFAULT_DRIVER,
- :old.ERP_COMPANY_CODE,
- :old.BADGE_READER_MODEL,
- :old.CO2_CATEGORY,
- :old.CO2_CATEGORY_DESCRIPTION,
- :old.COST_PER_DAY,
- :old.COST_PER_HR,
- :old.DETAILED_DESCRIPTION,
- :old.ERP_ARTICLE_DESCRIPTION,
- :old.ERP_ARTICLE_NUMBER,
- :old.ERP_COST_CENTER,
- :old.ERP_DRIVER_COMPANY_CODE,
- :old.ERP_EQUIPMENT_NR,
- :old.ERP_EQUIPMENT_TYPE,
- :old.ERP_FLEET_EQUIPMENT_NR,
- :old.ERP_FLEET_STATUS,
- :old.ERP_LOCATION,
- :old.ERP_PERIOD_ORDER,
- :old.ERP_SERIAL_NUMBER,
- :old.ERP_STORE,
- :old.ERP_SYSTEM_STATUS,
- :old.ERP_USAGE,
- :old.ERP_WBS_DESCRIPTION,
- :old.ERP_WBS_POSITION,
- :old.FMS_CABLE_MODEL,
- :old.FUEL_TANK_CARD_NR,
- :old.IS_ON_CALL,
- :old.IS_ON_CALL_CUSTOMER,
- :old.IS_ON_CALL_FROM_DATE,
- :old.IS_ON_CALL_TO_DATE,
- :old.IS_TEMPORARY_CAR,
- :old.LEASING_CODE,
- :old.LEASING_COMPANY,
- :old.MAINTENANCE_PLAN_CODE,
- :old.MOTOR_POWER,
- :old.NIGHT_USE_ALLOWED,
- :old.NUMBERPLATE_DATE,
- :old.OTHER_EQUIPEMENTS,
- :old.OTHER_EQUIPMENTS,
- :old.PLANNED_END_OF_CONTRACT,
- :old.PLANNED_KM_PER_YEAR,
- :old.PLANNED_START_OF_CONTRACT,
- :old.PND_INSTALL_TYPE,
- :old.PND_LAST_DELIVERY_DATE,
- :old.PND_MODEL,
- :old.PND_SERIAL_NR,
- :old.PRIVATE_USE_ALLOWED_FROM_DATE,
- :old.PRIVATE_USE_ALLOWED_TEMP,
- :old.PRIVATE_USE_ALLOWED_TO_DATE,
- :old.STATUS_DESCRIPTION,
- :old.TECHNICAL_CONTROL_DATE,
- :old.VEHICLE_STATUS_ID,
- :old.VEH_FCT,
- :old.WARANTY_EXPIRATION_DATE,
- :old.DO_NOT_INVOICE_IF_NO_DATA,
- :old.VEHICLE_SPEED_TYPE_ID,
- :old.OBU,
- :old.COMPUTE_VEHICLE_ACTIVITY,
- :old.VEHICLE_ECO_PROFILE_ID,
- :old.LAST_CONTAINER_VEHICLE_ID,
- :old.DEFAULT_CONTAINER_VEHICLE_ID,
- :old.ACT_INST_TYPE,
- :old.REQ_INST_TYPE,
- :old.USE_DRIVER_BADGE_EVENT,
- :old.ERP_ARTICLE_DESC_FR,
- :old.ERP_ARTICLE_DESC_UK,
- :old.ERP_INTERNAL_ORDER_NUM,
- :old.TYPE,
- :old.MTM,
- :old.MTM_SLEEP,
- :old.SINGLE_WEIGHT,
- :old.MAX_CHARGE,
- :old.EURONORM,
- :old.TACHOGRAPH,
- :old.TACHOGRAPH_TYPE,
- :old.PERIODIC_MAINTENANCE_PTO_HR,
- :old.BADGE_MEANS_WORK_TIME,
- :old.AVG_DAY_HR,
- :old.AVG_DAY_KM,
- :old.LAST_EQUIPMENT_STORE_PLACE_ID,
- :old.GRAPHICAL_SYMBOL_ID,
- :old.VO_OP_STATUS_ID,
- :old.REAL_OWNER_NAME,
- :old.REAL_OWNER_SHORT_NAME,
- :old.VO_CLASS_TREE_ID,
- :old.LAST_RU_TECHNICAL_STATUS_ID,
- :old.IS_CLONE_OF_VEHICLE_ID,
- :old.LAST_INVENTORY_DATE,
- :old.LAST_INVENTORY_BOX_CHECKED
- );
- end if;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement