Advertisement
psi_mmobile

Untitled

Mar 25th, 2020
769
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 1.22 KB | None | 0 0
  1. FUNCTION insGenVDRow(p_creation_date IN DATE, p_latitude IN VARCHAR, p_longitude IN VARCHAR, p_gps_date IN VARCHAR, p_gps_full_date IN DATE, p_wgs84_latitude IN NUMBER, p_wgs84_longitude IN NUMBER, p_vehicle_id IN NUMBER, p_event_type_id IN NUMBER, p_date_day IN DATE) RETURN NUMBER;
  2.   FUNCTION insGenVDRow(p_creation_date IN DATE, p_latitude IN VARCHAR, p_longitude IN VARCHAR, p_gps_date IN VARCHAR, p_gps_full_date IN DATE, p_wgs84_latitude IN NUMBER, p_wgs84_longitude IN NUMBER, p_vehicle_id IN NUMBER, p_event_type_id IN NUMBER, p_date_day IN DATE) RETURN NUMBER AS
  3.     v_vehicle_data_id NUMBER(10);
  4.     BEGIN
  5.     SELECT seq_vehicle_data_id.NEXTVAL INTO v_vehicle_data_id FROM dual;
  6.  
  7.     INSERT INTO vehicle_data (vehicle_data_id, creation_date, latitude, longitude, gps_date, gps_full_date, wgs84_latitude, wgs84_longitude, vehicle_id, event_type_id, date_day)
  8.     VALUES (v_vehicle_data_id, p_creation_date, p_latitude, p_longitude, p_gps_date, p_gps_full_date, p_wgs84_latitude, p_wgs84_longitude, p_vehicle_id, p_event_type_id. p_date_day);
  9.    
  10.     p_msg_util.updateVehicleOnLastEvent(v_vehicle_data_id);
  11.    
  12.     INSERT INTO vd_poi
  13.     VALUES (seq_vd_poi_id.NEXTVAL, v_vehicle_data_id, p_poi_id, 1, NULL, SYSDATE, NULL);
  14.  
  15.     RETURN v_vehicle_data_id;
  16.   END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement