Answer Posted / guru
__________________________________________________________
DECLARE
fileHandler UTL_FILE.FILE_TYPE;
BEGIN
fileHandler := UTL_FILE.FOPEN('/tmp', 'myfile', 'R');
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;
/
________________________________________________________
Thanks
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is data types in sql?
what is a view? : Sql dba
Does sql require a server?
Can we call a function containing dml statements in a select query?
What does the sign mean in sql?
Why is sql*loader direct path so fast?
Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?
What is trigger in flip flop?
Which is better stored procedure or query?
How can I get the number of records affected by a stored procedure?
what are the advantages of sql ? : Sql dba
What are the different types of dbms?
Explain some predefined exceptions.
Why do we create stored procedures & functions in pl/sql and how are they different?
Why is stored procedure faster than query?