Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2004
    Posts
    6

    Export Oracle table (data) to file.txt

    I want to export a table of oraculo 7 to a text file, this text file to concern it in Access.

  2. #2
    Join Date
    Jan 2004
    Location
    Germantown, MD
    Posts
    34

    Re: Export Oracle table (data) to file.txt

    Originally posted by ferlinux
    I want to export a table of oraculo 7 to a text file, this text file to concern it in Access.
    I think I understand your question... If so, try this:

    -- Script starts here
    /*
    Make sure you replace "my_table" with the actual table name.
    And, do a describe of the table and replace the field1, field2, etc.
    with your column names.

    This script will create a comma delimited file named: c:\myfile.txt
    */

    set head off -- this will turn off your column name heading
    spool c:\myfile.txt

    select field1||', '||field2||', '||field3
    from my_table;
    spool off -- turn spooling off
    set head on -- turn the heading parameter back on

    -- end of script

    I hope this helps,
    Rip
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. "
    - Albert Einstein

  3. #3
    Join Date
    Mar 2004
    Posts
    6
    Ok, you can say to me where to apply this, to make all this passage by step.
    Thank you very much to collaborate to me, greetings

  4. #4
    Join Date
    Jan 2004
    Location
    Germantown, MD
    Posts
    34
    SQL*Plus...

    1. Create a sql directory in the root of your C drive.
    2. Using a text editor, create a file using the data listed above... Save it as c:\sql\myscript.sql.
    3. Go into SQL*Plus as the table owner.
    4. Type: @c:\sql\myscript.sql

    If you are using Unix, change the c:\sql\ to ~/sql/
    Last edited by the Oracle; 03-31-04 at 15:04.
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. "
    - Albert Einstein

  5. #5
    Join Date
    Mar 2004
    Posts
    6

    Cool

    Excuse that bothers to you, but is urgent to solve the problem to me that I have with oracle7, I need but detail the solution that you gave me.

  6. #6
    Join Date
    Mar 2004
    Posts
    6
    Thanks, have a complete example, because not nothing of oracle7 for Windows/unix.

  7. #7
    Join Date
    Jan 2004
    Location
    Germantown, MD
    Posts
    34
    no worries...

    I think.
    "The world is a dangerous place, not because of those who do evil, but because of those who look on and do nothing. "
    - Albert Einstein

Posting Permissions

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