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

What is meant by truncate in sql?

1075


How to start oracle sql developer?

1049


Explain what is a database?

1094


How can I see all tables in sql?

1086


What is the difference between a primary key and a clustered index?

1000


What are inner and outer joins examples of both?

976


What are the methods of filing?

946


Can cursors be part of a trigger body?

1648


List the ways to get the count of records in a table?

903


Show code of a cursor for loop.

1068


Do triggers have restrictions on the usage of large datatypes, such as long and long raw?

1181


How many times can we commit in a loop?

1029


give the syntax of grant and revoke commands? : Sql dba

1162


what is online transaction processing (oltp)? : Sql dba

1004


What is the max nvarchar size?

993