DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Table contents to flat file

  1. #1
    Join Date
    Sep 2002
    Posts
    376

    Table contents to flat file

    hi,

    What is the best way to write the Oracle table contents to Flat file ?

    Is there any tool provided by oracle for the same
    ------------------------------------------------------------------------
    The most enjoyable things in the world are either Immoral or too Expensive or otherwise Inaccessible anyway

  2. #2
    Join Date
    Sep 2005
    Posts
    278
    There are few ways to accomplish your requirement:

    through SQL statment

    Select col1 || ',' || col2
    from <>

    secondly

    through PL/SQL procedure using UTL_FILE package

    Through PL/SQL u can have better control on formating

  3. #3
    Join Date
    Sep 2002
    Posts
    376
    Quote Originally Posted by tabreaz
    There are few ways to accomplish your requirement:

    through SQL statment

    Select col1 || ',' || col2
    from <>

    secondly

    through PL/SQL procedure using UTL_FILE package

    Through PL/SQL u can have better control on formating

    In first method u specified, does the output need to be spooled ??
    ------------------------------------------------------------------------
    The most enjoyable things in the world are either Immoral or too Expensive or otherwise Inaccessible anyway

  4. #4
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    of course it does

  5. #5
    Join Date
    Jun 2005
    Location
    London, UK
    Posts
    159
    Perhaps it is worth mentioning that "spool" is a SQL*Plus command.
    Last edited by WilliamR; 06-28-2006 at 02:28 AM.

  6. #6
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Tom Kyte (of course) has some solutions:
    http://asktom.oracle.com/~tkyte/flat/index.html
    "The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman

Posting Permissions

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


Click Here to Expand Forum to Full Width