PL-SQL code to write a file

By Amol Jadhav

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

SQL Querysql
1DECLARE
2   fHandler   UTL_FILE.FILE_TYPE;
3BEGIN
4   fHandler := UTL_FILE.FOPEN ('STUDENT_DIR', 'Details.txt', 'w'); ---dir,filename,mode
5
6   UTL_FILE.PUTF (fHandler, 'Name: Amol n');
7
8   UTL_FILE.FCLOSE (fHandler);
9EXCEPTION
10   WHEN UTL_FILE.invalid_path
11   THEN
12      raise_application_error (
13         -20000,
14         'Invalid path. Create directory or set UTL_FILE_DIR.');
15END;

Related posts: