Answer Posted / avi007
--Read file
DECLARE
fileHandler UTL_FILE.FILE_TYPE;
BEGIN
fileHandler := UTL_FILE.FOPEN('/tmp', 'myfile', 'R');
UTL_FILE.GETF(fileHandler, 'Look ma, I''m writing to a
file!!!\n');
UTL_FILE.FCLOSE(fileHandler);
EXCEPTION
WHEN utl_file.invalid_path THEN
raise_application_error(-20000, 'ERROR:
Invalid path
for file or path not in INIT.ORA.');
END;
/
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What packages are available to pl/sql developers?
What are field types?
Can you call pl/sql package functions from within a fast formula?
Explain the difference between sql and mysql.
What is exception? What are the types of exceptions?
What is the difference between partition and index?
What are the most important characteristics of pl/sql?
define join and explain different type of joins? : Sql dba
Can we write dml inside a function in sql server?
what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba
Is ms sql is free?
How to avoid using cursors?
Why primary key is required?
What is delimiter in pl sql?
Why join is faster than subquery?