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:
- View java class source in oracle database
- Load Java source code in oracle database
- Query to find and remove Oracle database locks
- PL-SQL code to read a file
- Query to find second and third highest value
- PL-SQL Procedure to send email with attachment
- Query to get the details of the lock in the database
- Query to find Table size