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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is sql port 1433 encrypted?

1017


What are the advantages of pl sql?

1119


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

1024


Define union, minus, union all, intersect ?

996


Can you join a table to itself?

1118


what is the difference between blob and text? : Sql dba

1005


What are the most important characteristics of pl/sql?

1144


How do I know if I have sql express or standard?

1023


How can you maintain the integrity of your database on instances where deleting an element in a table result in the deletion of the element(s) within another table?

1121


Can a primary key be a foreign key?

1014


What is sql*plus?

1064


Explain what is rdbms?

1025


What jobs use sql?

977


Why do we need unique key in a table?

951


how to increment dates by 1 in mysql? : Sql dba

969