Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> pl/sql write file
Hello guru's,
I am having a problem with writing data to a file and I was wandering if you could help me out here. The sql script goes as follows:
declare
v_out_line varchar2(2000);
fileID utl_file.file_type;
begin
fileID := utl_file.fopen ('/tmp','tst.csv','W'); v_out_line := 'This'
||','||'is'
||','||'a'
||','||'piece'
||','||'of'
||','||'text.';
utl_file.put_line(fileID,v_out_line); utl_file.fclose(fileID);
I am getting errors with this script like "unhandled user-defined exception" and some more nasty errors. I read somewhere that I should put a line like utl_file_dir = * to overcome this problem but unfortunately it doesn't.
Thanks in advance,
Rob
BTW if this is the wrong newsgroup for postings these questions, point me to the wright one please. Received on Sat Jan 13 2001 - 13:05:04 CST