Total Pageviews

Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Sunday, 22 January 2023

Oracle : How to move file from one directory to another directory in PLSQL

 How to move file from one directory to another directory in PLSQL

procedure xx_move_file_to_archive_dir(p_file_name in varchar2)


is


begin


debug_msg_prc(chr(10)||'-----Start xx_move_file_to_archive_dir: To Move same name file to archive if exists.',g_log);


debug_msg_prc( 'Source Path:'||g_directory_path_out||',Target Path:'||g_directory_path_archive ||',FileName:'||p_file_name,g_log);


UTL_FILE.FRENAME (g_directory_path_out,--source


 p_file_name,


g_directory_path_archive,--target archive


p_file_name||'ar',--new archive file name


TRUE);


debug_msg_prc('FileName:'||p_file_name ||' move to archive directory',g_log);


exception when others then


debug_msg_prc('Error xx_move_file_to_archive_dir.Seems File not available to move. '||substr(SQLERRM,1,200),g_log);


end xx_move_file_to_archive_dir;

FUSION: Purchasing Query

  1) ---------CPA to PO Amount---------- select poh.segment1, (select sum(nvl(cpol.quantity,1)* cpol.unit_price) from po_headers_all cpoh,po...