Dec 11, 2003 #1 jbenh IS-IT--Management Dec 2, 2002 21 0 0 US I need to create a text file from production data using PL/SQL on Oracle 8i on HPUX v11. A quick search of OTN was no luck. Thanks, Ben
I need to create a text file from production data using PL/SQL on Oracle 8i on HPUX v11. A quick search of OTN was no luck. Thanks, Ben
Dec 11, 2003 #2 spicysudhi Programmer Nov 10, 2003 575 0 0 FR DECLARE L_STR VARCHAR2(4000); L_OUTPUT UTL_FILE.FILE_TYPE; BEGIN L_OUTPUT := UTL_FILE.FOPEN('d:\','test.txt', 'W'); L_STR := 'Sample test message to file'; UTL_FILE.PUT_LINE(L_OUTPUT,L_STR); UTL_FILE.FCLOSE( L_OUTPUT ); EXCEPTION WHEN OTHERS THEN UTL_FILE.FCLOSE( L_OUTPUT ); END; Note: give the directory permission in init.ora file by setting the utl_file_dir variable. -Sudhi Upvote 0 Downvote
DECLARE L_STR VARCHAR2(4000); L_OUTPUT UTL_FILE.FILE_TYPE; BEGIN L_OUTPUT := UTL_FILE.FOPEN('d:\','test.txt', 'W'); L_STR := 'Sample test message to file'; UTL_FILE.PUT_LINE(L_OUTPUT,L_STR); UTL_FILE.FCLOSE( L_OUTPUT ); EXCEPTION WHEN OTHERS THEN UTL_FILE.FCLOSE( L_OUTPUT ); END; Note: give the directory permission in init.ora file by setting the utl_file_dir variable. -Sudhi
Dec 11, 2003 Thread starter #3 jbenh IS-IT--Management Dec 2, 2002 21 0 0 US Thanks. I revised my search and found that the 9i database online documentation was available at http://www.engin.umich.edu/caen/wls/software/oracle/ I appreciate your quick response. Ben Upvote 0 Downvote
Thanks. I revised my search and found that the 9i database online documentation was available at http://www.engin.umich.edu/caen/wls/software/oracle/ I appreciate your quick response. Ben