Answer Posted / avi007
DECLARE
fileHandler UTL_FILE.FILE_TYPE;
BEGIN
fileHandler := UTL_FILE.FOPEN('/tmp', 'myfile', 'W');
UTL_FILE.PUTF(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 ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is oracle pl sql developer?
How do I create an index in word?
How do you declare a user-defined exception?
what are numeric data types? : Sql dba
What is latest version of sql?
Why we use stored procedure instead of query?
What are the disadvantages of not performing database normalization?
What is the difference between jpql and sql?
What is right join sql?
What is partition by in sql?
Can we use two order by clause in query?
Explain the update statement in sql
What does trigger mean in psychology?
What is meant by user defined function?
Explain the purpose of %type and %rowtype data types with the example?