Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2003
    Posts
    52

    Question Unanswered: create a new file with Oracle

    Hi all friends


    is it possible create a new file and write in it with UTL_FILE o is there another package which i can do this or with an stored procedure????


    Regards!!!!!

  2. #2
    Join Date
    Oct 2003
    Location
    Republic of Srpska, Bosnia and Herzegovina
    Posts
    35
    Hello.

    First you must create directory, and than you will be able to use utl_file.
    This is one example:

    create or replace directory YOUR_DIR as '/NEW_DIR';

    declare
    dirName varchar2(255);
    hFile utl_file.file_type;
    begin
    dirName := 'YOUR_DIR';
    hFile := utl_file.fopen(dirName, 'copy-ext-attrs.sql', 'w', 32000);
    utl_file.put_line(hFile, 'Your text here');
    utl_file.fclose(hFile);
    end;

    Hope this help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •