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 is intersect?
Can we connect to postgresql using sql developer?
declare l1 number := null; l2 number :=null; begin if l1=l2 then message('equal'); else if l1<>l2 then message('not equal'); else message('else'); end if; end if; end; What will be the output ?
what is a trigger in mysql? Define different types of trigger. : Sql dba
What is sqlservr exe?
Can there be more than one function with a similar name in a pl/sql block?
What is cost in sql execution plan?
What are the types of operators available in sql?
difference between pl/sql table and normal pl/sql table
Can we write create command in the plsql block?if possible how?
Are sql views compiled?
What is an index in sql with example?
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)