DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: sqlplus format

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Location
    New York
    Posts
    75

    sqlplus format

    Hi,
    I have a question, how can I avoid word wrap on the output of sqlplus?
    When I do sqlplus from oracle client on windows(9.2.0), if I set linesize 1000, it gives me the output(13 columns) without wrap. But if I do sqlplus from unix, or telnet from windows to unix, I get the wrapped output. Thanks for help.

    D.F.
    Still learning

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    the wrap is caused by the terminal -- if you spooled to a file you would not get wrapped output
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    May 2002
    Posts
    2,645
    set wrap [on | off]

  4. #4
    Join Date
    Feb 2003
    Location
    New York
    Posts
    75
    Thanks for help.
    I spool the output to a file, but I still get the wrap.
    I want all columns show up on one line like

    col1 col2 col3 col4 col5 col6 col7 ...

    I tried with client on windows even without spooling to a file. It works. But not on Unix. The program has to be run from unix.
    Still learning

  5. #5
    Join Date
    Feb 2003
    Location
    New York
    Posts
    75
    SQL> set linesize 1000
    SQL> set wrap off
    SQL> set heading off
    SQL> spool foo.txt
    SQL> select * from leadsin where rownum < 4;

    6309069623 MALISKA BRUCE 973 WELLINGTON CIR AURORA IL 60506 0 0
    6309069769 WILLIAMS CLIFFORD 130 TEALWOOD RD MONTGOMERY IL 60538 0 0
    6309069982 CONNELLY JOHN 130 S HANKES RD AURORA IL 60506 0 0

    Still not working......
    Still learning

  6. #6
    Join Date
    Feb 2003
    Location
    New York
    Posts
    75
    Sorry, when I post it, it seems to be working..... But when I look at the file, it still wrapped. Does that mean it is working? because I have no way of testing it.
    Still learning

  7. #7
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Code:
    SQL> set linesize 1000
    SQL> set wrap off
    SQL> set heading off
    SQL> spool foo.txt
    SQL> select * from leadsin where rownum < 4;
    
    6309069623 MALISKA                   BRUCE                     973 WELLINGTON CIR             AURORA               IL 60506                        0            0
    6309069769 WILLIAMS                  CLIFFORD                  130 TEALWOOD RD                MONTGOMERY           IL 60538                        0            0
    6309069982 CONNELLY                  JOHN                      130 S HANKES RD                AURORA               IL 60506                        0            0
    
    Still not working......
    It looks from your result like it is. Am i misinterpreting?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  8. #8
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    By the way, i notice that you're posting real people's names here. That's a pretty dumb thing to do. Are you doing telemarketing lists?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  9. #9
    Join Date
    Nov 2000
    Location
    Baltimore, MD USA
    Posts
    1,339
    Do you have line-wrap on in the editor with which you are examining the file?
    Christopher R. Long
    ChrisRLong@HotMail.Com
    But that's just my opinion. I could be wrong

  10. #10
    Join Date
    Feb 2003
    Location
    New York
    Posts
    75
    I ftp to NT, and use notepad to open it and uncheck the word wrap, it worked. Thanks all for help.

    DF
    Still learning

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