Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how can i read write files from pl/sql

Answers were Sorted based on User's Feedback



how can i read write files from pl/sql..

Answer / deepak singh

throug the Text_io package

Is This Answer Correct ?    2 Yes 0 No

how can i read write files from pl/sql..

Answer / avi007

DECLARE
fileHandler UTL_FILE.FILE_TYPE;
BEGIN
fileHandler := UTL_FILE.FOPEN('/tmp', 'myfile', 'W');
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;
/

Is This Answer Correct ?    2 Yes 0 No

how can i read write files from pl/sql..

Answer / 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

More SQL PLSQL Interview Questions

Show code of a cursor for loop.

0 Answers  


What is sqlite used for?

0 Answers  


what is data integrity? : Sql dba

0 Answers  


What is the best strategy to use COMMIT in a pl/sql loop?

3 Answers  


What is out parameter used for eventhough return statement can also be used in pl/sql?

0 Answers  


what is the difference between delete and truncate statement in sql? : Sql dba

0 Answers  


what are the limitations of identity column? : Transact sql

0 Answers  


What is the purpose of normalization?

0 Answers  


how do you login to mysql using unix shell? : Sql dba

0 Answers  


What are keys in sql?

0 Answers  


What mean sql?

0 Answers  


Is sql the best database?

0 Answers  


Categories