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 files from a pl/sq l program

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


Please Help Members By Posting Answers For Below Questions

What are views in sql?

979


How to use transactions efficiently : transact sql

1054


What plvcmt and plvrb does in pl/sql?

1319


Differentiate between sga and pga.

1161


Do we need to create index on primary key?

926


Can we write dml inside a function in sql server?

945


what is the difference between nested subquery and correlated subquery?

1052


How do I get sql certification?

969


What is a pl/sql block?

1221


What is t sql used for?

1010


Can a table contain multiple primary key’s?

1096


What are the different tcl commands in sql?

1172


What are the operators used in select statements?

1057


What is pl sql collection?

962


Explain character-manipulation functions?

1123