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

    Unanswered: write from a table toa file

    Hi all friends:


    I need to pass the information from a table in oracle to a file, this file munst contain the rows in the next format

    data1|data2|data3|

    and this table contains thounsands on rows, maybe millions, so, my question is

    what's the best way to do this???

    I know i can program an app which take every register from the table and write the file, and i know i can use Data import and export tool of Sql Server.

    Or there is a better way, maybe with an Stored Procedure???


    ThanX for all


    Regards!!!

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    from SQL*Plus use the SPOOL command

  3. #3
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    You can use spool to output sql to a text file using concatenation with your columns.

    Use environment variables to set sql up to make the file look like you want ... ie, set heading off, set linesize xxx, set pagesize 0,
    set termout off ..... etc


    HTH
    Gregg

  4. #4
    Join Date
    Nov 2003
    Posts
    52
    ThanX!!!

Posting Permissions

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