Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2002

    Unanswered: PL/Sqlplus-extracting data from Table to comma delim file

    Thanks for your help in advance. I'll try to keep it short.
    I'm trying to extract data from a table into a comma delimited file using Sql/SqlPlus. I've written the sql and spool it to a file. This works ok, where the problem comes in is that I have to set a linesize so long that the file becomes very big. I would like to remove these "extra" spaces at the end of each line. Each line varies in length as is with a delimited file.

    Is there a diff. approach I should be taking? I don't have any 3rd party software to work with only Pl/SQL, Sql,Plus.


  2. #2
    Join Date
    Feb 2001
    NC, USA
    A better option might be to use the UTL_FILE package to write directly to an O/S file.

    Alternatively, I've attached a pro*c program that accepts a sql string as a parameter that can be redirected to a file. This produces a comma seperated extract.
    Attached Files Attached Files

Posting Permissions

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