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

I need a function for a train ticket reservation please answer it thanks in advance

1028


what are properties of a transaction? : Sql dba

1094


How long does it take to learn pl sql?

1063


Differentiate between syntax and runtime errors.

1193


What is the use of <> sql?

980


Define tables and fields in a database

1135


How show all rows in sql?

1015


Which one is faster ienumerable or iqueryable?

937


What is consistency?

1130


When is the explicit cursor used ?

1038


If the application is running very slow? At what points you need to go about the database in order to improve the performance?

1002


Can we have two clustered index on a table?

1025


Can we create view in stored procedure?

978


How do I order columns in sql?

1012


Is delete faster than truncate?

1003