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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what are different types of collation sensitivity? : Sql dba

1057


What is a common use of group by in sql?

1029


how to create a new table in mysql? : Sql dba

968


What is not equal in sql?

1086


Is sql the best database?

955


What is the importance of sqlcode and sqlerrm?

1329


What is sql comments?

1059


Is keyword pl sql?

960


What is break?

1181


What do you mean by rowid?

952


Is it possible to read/write files to-and-from PL/SQL?

1084


What is type and rowtype in pl sql?

1007


Can we alter stored procedure?

967


In what condition is it good to disable a trigger?

995


What is fmtonly in sql?

1059