FAQ
I am running a query to dump some rows and I made the rows comma delimited
like this
select col1||','||col2||','|| ....
from table

I set lines 5000.

I want to spool it so the spool file does not wrap. This way I can load the
data into excel. The data keeps wrapping and when i import it, I get it
wrapped in excel. its alot of columns. lines 5000 should be sufficient. I
just don't have enough screen space for it all.

Search Discussions

  • Jared Still at Jun 11, 2008 at 4:15 pm
    set trimspool on

    defaults to true I believe starting with some version of oracle.
    On Wed, Jun 11, 2008 at 6:27 AM, Rick Ricky wrote:

    I am running a query to dump some rows and I made the rows comma delimited
    like this
    select col1||','||col2||','|| ....
    from table

    I set lines 5000.

    I want to spool it so the spool file does not wrap. This way I can load the
    data into excel. The data keeps wrapping and when i import it, I get it
    wrapped in excel. its alot of columns. lines 5000 should be sufficient. I
    just don't have enough screen space for it all.
    --
    Jared Still
    Certifiable Oracle DBA and Part Time Perl Evangelist

    --
    http://www.freelists.org/webpage/oracle-l
  • Anurag Verma at Jun 11, 2008 at 5:25 pm
    Hi,

    Did you try "set wrap off"

    I tested the below script and it is working...

    set wrap off
    set lines 5000
    spool out1
    select * from
    where rownum < 2;
    spool off

    Thanks,
    Anurag
    On Wed, Jun 11, 2008 at 6:27 AM, Rick Ricky wrote:

    I am running a query to dump some rows and I made the rows comma delimited
    like this
    select col1||','||col2||','|| ....
    from table

    I set lines 5000.

    I want to spool it so the spool file does not wrap. This way I can load the
    data into excel. The data keeps wrapping and when i import it, I get it
    wrapped in excel. its alot of columns. lines 5000 should be sufficient. I
    just don't have enough screen space for it all.
    --

    Anurag Verma,
    Database Administrator
    ERCOT(Electric Reliability Council of Texas),
    Texas 76574

    --
    http://www.freelists.org/webpage/oracle-l
  • Jack van Zanen at Jun 11, 2008 at 10:49 pm
    I think you have your answer already

    Just a little tip:

    set colsep "," -- saves you from having to put the ||','|| between each
    column

    Jack
    On 11/06/2008, Rick Ricky wrote:

    I am running a query to dump some rows and I made the rows comma delimited
    like this

    select col1||','||col2||','|| ....
    from table


    I set lines 5000.


    I want to spool it so the spool file does not wrap. This way I can load the
    data into excel. The data keeps wrapping and when i import it, I get it
    wrapped in excel. its alot of columns. lines 5000 should be sufficient. I
    just don't have enough screen space for it all.
    --
    J.A. van Zanen

    --
    http://www.freelists.org/webpage/oracle-l
  • Greg Rahn at Jun 12, 2008 at 3:12 am
    http://asktom.oracle.com/tkyte/flat/

    not via sqlplus, but exactly what you probably want
    On Wed, Jun 11, 2008 at 6:27 AM, Rick Ricky wrote:
    I am running a query to dump some rows and I made the rows comma delimited
    like this
    select col1||','||col2||','|| ....
    from table
    I set lines 5000.
    I want to spool it so the spool file does not wrap. This way I can load the
    data into excel. The data keeps wrapping and when i import it, I get it
    wrapped in excel. its alot of columns. lines 5000 should be sufficient. I
    just don't have enough screen space for it all.
    --
    Regards,

    Greg Rahn
    http://structureddata.org
    --
    http://www.freelists.org/webpage/oracle-l
  • Yechiel Adar at Jun 12, 2008 at 6:10 am
    The screen space has nothing to do with it.
    You need to open your spooled file with an editor and check if the lines
    were wrapped.
    If they were wrapped, increase your line length.

    Adar Yechiel
    Rechovot, Israel

    Rick Ricky wrote:
    lines 5000 should be sufficient. I just don't have enough screen space
    for it all.
    --
    http://www.freelists.org/webpage/oracle-l

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedJun 11, '08 at 1:27p
activeJun 12, '08 at 6:10a
posts6
users6
websiteoracle.com

People

Translate

site design / logo © 2022 Grokbase