how can i read files from a pl/sq l program
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / swayamji
SELECT TEXT FROM USER_SOURCE WHERE NAME LIKE '<SUB PROGRAM
NAME>'
| Is This Answer Correct ? | 0 Yes | 3 No |
What are the dml statements?
Why use triggers in sql?
What is sqlite used for?
Types of joins ?
3 Answers Digital GlobalSoft, HeadStrong,
What are synonyms in sql?
find the third highest salary?
What is a mutating table
What is sql prepared statement?
How do you delete data from a table?
What are the different dcl commands in sql?
Types of indexes. What is the default key created when a primary key is created in a table ?
How do I run a sql query?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)