Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UTL_FILE

Status
Not open for further replies.

BADCODER

Programmer
Sep 29, 2003
11
US
I am using a cursor to fetch value into a variable, then write this variable to a file.

QUESTION:
*********

Everytime the loop is executed, the variable v_select is written to a new line in the file.

Is there a way to ignore line feed and write the entire output in ONE SINGLE line?


CODE:
******************************
BEGIN
id := UTL_FILE.FOPEN('/mydir','myfile,'a');
UTL_FILE.PUT(id,'myfile');

LOOP
FETCH p_Cur INTO v_select;
EXIT WHEN p_Cur%NOTFOUND;
UTL_FILE.PUT(id,v_select);
END LOOP;
UTL_FILE.FFLUSH(id);
UTL_FILE.FCLOSE(id);
CLOSE p_Cur;
END ;

****************************************

 
Bad, my man,

Don't you read your other, identical threads on other forum's. I answered this for you two days ago (19 Oct @ 23:79 GMT, 16:40 Mountain Time) on the Oracle 8i forum:

"Bad,

Just say, "UTL_FILE.PUT(...", which "stages" the data for output, then when you are ready to actually output that which you have staged, you may say, "utl_file.fflush(...".

Let me know if this behaves as you wish,

Dave
Sandy, Utah, USA @ 23:79 GMT, 16:40 Mountain Time"

Dave
Sandy, Utah, USA @ 17:25 GMT, 10:25 Mountain Time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top