Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2005
    Location
    India
    Posts
    217

    Unanswered: comma seperated values in sqlplus

    Does any one know how to get comma seperated values in sqlplus?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    get them??? you want to avoid them!!
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    He probably means "store them into a text file" as he as posted another very similar question into this forum as well. So I guess
    Code:
    spool output.txt
    select col1||','||col2||','|col3
    from table
    is what the OP is looking for.
    More information is available here:
    http://download-west.oracle.com/docs...a90842/toc.htm

    Especially the different SET options are useful to get the desired output.

    The chapter about report-formatting might be interesting as well:
    http://download-west.oracle.com/docs...a90842/ch7.htm

  4. #4
    Join Date
    Feb 2005
    Location
    India
    Posts
    217
    Thank you! That worked. I was expecting something like SET DELIMITER....
    I think that is not avialable....

  5. #5
    Join Date
    May 2006
    Posts
    132
    In SQL*Plus, you could actually use:

    Code:
    set head off feed off colsep ","
    and then do your select.
    Last edited by ebrian; 05-03-06 at 11:47.

Posting Permissions

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