how can i read files from a pl/sq l program

Answers were Sorted based on User's Feedback



how can i read files from a pl/sq l program..

Answer / mahesh

by using utl_file (built-in package)

Is This Answer Correct ?    5 Yes 0 No

how can i read files from a pl/sq l program..

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

how can i read files from a pl/sq l program..

Answer / swayamji

SELECT TEXT FROM USER_SOURCE WHERE NAME LIKE '<SUB PROGRAM
NAME>'

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL PLSQL Interview Questions

How to return an array from java to pl/sql?

0 Answers  


what is oracle database ? : Sql dba

0 Answers  


what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba

0 Answers  


Does view contain data?

0 Answers  


What can sql server reporting services do?

0 Answers  






Is keyword pl sql?

0 Answers  


What is pl sql package?

0 Answers  


what happens if null values are involved in expressions? : Sql dba

0 Answers  


how to dump a table to a file with 'mysqldump'? : Sql dba

0 Answers  


Q1.all the depts which has more then 10 empls? Q2.all the dept which does not have any emply? Q3 all the emp which does not have any dept? Q4 get all the emply detais with the dept details it dept is exit otherwise any emp details? Q5 how to debugg the dynamic sql and packages?

4 Answers   KPIT,


what is single byte over head in oracle..?

0 Answers  


What is a data manipulation language?

0 Answers  


Categories