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 are different types of collation sensitivity? : Sql dba
What is a common use of group by in sql?
how to create a new table in mysql? : Sql dba
What is not equal in sql?
Is sql the best database?
What is the importance of sqlcode and sqlerrm?
What is sql comments?
Is keyword pl sql?
What is break?
What do you mean by rowid?
Is it possible to read/write files to-and-from PL/SQL?
What is type and rowtype in pl sql?
Can we alter stored procedure?
In what condition is it good to disable a trigger?
What is fmtonly in sql?