Advertisement
psi_mmobile

Untitled

Feb 19th, 2021
1,273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 0.60 KB | None | 0 0
  1. PROCEDURE deleteGroup(p_vo_group_name IN VARCHAR2, p_vo_group_company_nr IN VARCHAR2, p_vehicle_owner_id IN NUMBER) IS
  2. v_vo_group_id NUMBER(10);
  3. BEGIN
  4. SELECT vo_group_id
  5. INTO v_vo_group_id
  6. FROM vo_group
  7. WHERE vehicle_owner_id = p_vehicle_owner_id
  8. AND LOWER(name) = LOWER(p_vo_group_name)
  9. AND LOWER(company_nr) = LOWER(p_vo_group_company_nr);
  10.  
  11. DELETE FROM vo_group_person
  12. WHERE vo_group_id = v_vo_group_id;
  13.  
  14. DELETE FROM vo_group_vehicle
  15. WHERE vo_group_id = v_vo_group_id;
  16.  
  17. DELETE FROM vo_group_oc_poi
  18. WHERE vo_group_id = v_vo_group_id;
  19.  
  20. DELETE FROM vo_group
  21. WHERE vo_group_id = v_vo_group_id;
  22.  
  23. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement