Utl_file包错误

时间:2018-06-15 08:15:13

标签: sql plsql oracle11g

我尝试执行以下代码,然后成功了。但是在目录中我没有看到我的文件。

declare 
    fp utl_file.file_type;
    cursor c1 is select * from apr where rownum<=10;

begin
    fp:=utl_file.fopen('FLAT_FILE_DIR','test2.txt','W');

    for i in c1
    loop
        utl_file.put_line(fp,i.TERM_PERIOD||'  '||i.FLAT_RATE_APR||'  '||i.APR);
    end loop;

    utl_file.fclose(fp);
 end;

0 个答案:

没有答案