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

Where not exists in sql?

908


What is write ahead logging in sql server?

987


What are all ddl commands?

1012


Can you do multiple joins in sql?

969


Which is better stored procedure or query?

918


How do I pipe the output of one isql to another?

943


Is it important to partition hard disk?

964


Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.

952


what are the security recommendations while using mysql? : Sql dba

1046


Why is the cursor important?

975


Why we use stored procedure instead of query?

949


What are the most important ddl statements in sql?

1024


Which command is used to delete a trigger?

1259


Are subqueries faster than joins?

948


How many tables can a sql database have?

924