Advertisement
psi_mmobile

Untitled

Aug 11th, 2020
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function get_filename (p_path IN VARCHAR2) return varchar2 is
  2. v_file VARCHAR2(1000);
  3.  
  4. BEGIN
  5.  
  6. IF INSTR(p_path,'\') > 0 THEN
  7. v_file := SUBSTR(p_path,(INSTR(p_path,'\',-1,1)+1),length(p_path));
  8.  
  9. -- If no slashes were found, return the original string
  10. ELSE
  11. v_file := p_path;
  12.  
  13. END IF;
  14.  
  15. RETURN v_file;
  16.  
  17. END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement