PL-SQL code to write a file

PL-SQL code to write a file
Oracle apps ebs plsql to write a file
how to write a file using plsql

DECLARE
   fHandler   UTL_FILE.FILE_TYPE;
BEGIN
   fHandler := UTL_FILE.FOPEN ('STUDENT_DIR', 'Details.txt', 'w'); ---dir,filename,mode

   UTL_FILE.PUTF (fHandler, 'Name: Amol n');

   UTL_FILE.FCLOSE (fHandler);
EXCEPTION
   WHEN UTL_FILE.invalid_path
   THEN
      raise_application_error (
         -20000,
         'Invalid path. Create directory or set UTL_FILE_DIR.');
END;
Related posts: Upload your own post and refer it anywhere anytime:

Leave a Reply