Results 1 to 4 of 4

Thread: Display

  1. #1
    Join Date
    Apr 2004
    Posts
    113

    Unanswered: Display

    How can I get sqlplus from command line to display all the columns of a table straigt across the screen instead of wrapping to the next line?

    I have tried the following:

    set termout off
    set head off
    set verify off
    set feedback off
    set linesize 120
    column "Event Name" format a32
    set numwidth

    I am just trying to do a select * from the table.

  2. #2
    Join Date
    Oct 2004
    Posts
    145
    If you are linesize is wide enough to hold all characters of your select *, the wrap around can not be avoided in sqlplus. However, if you spool it to a file it will capture a single record as one line.

    One of the features that I used to like about svrmgrl (server manager not sqlplus) was this feature (display without wrap around).

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    depends on your linesize and your columns in your table.
    also, in unix it is dependent upon your window size as technically is is on
    one line, but is displayed in one window so it is wrapped.

    example:
    PHP Code:
    system@> select from v$instance;

    INSTANCE_NUMBER INSTANCE_NAME    HOST_NAME
    --------------- ---------------- ----------------------------------------------------------
    VERSION           STARTUP_T STATUS       PAR    THREAD# ARCHIVE LOG_SWITCH_ LOGINS     SHU
    ----------------- --------- ------------ --- ---------- ------- ----------- ---------- ---
    DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST
    ----------------- ------------------ ---------
                  
    1 pg         qa
    9.2.0.4.0         10
    -NOV-04 OPEN         NO           1 STARTED             ALLOWED    NO
    ACTIVE            PRIMARY_INSTANCE   NORMAL

    system
    @>  set linesize 500
    system
    @>  col host_name format a10
    system
    @> col version format a10
    system
    @> col status format a7
    system
    @> /

    INSTANCE_NUMBER INSTANCE_NAME    HOST_NAME  VERSION    STARTUP_T STATUS  PAR    THREAD# ARCHIVE LOG_SWITC
    --------------- ---------------- ---------- ---------- --------- ------- --- ---------- ------- ----
                  
    1 pg                       qa 9.2.0.4.0  10-NOV-04 OPEN    NO           1 STARTED 
    Last edited by The_Duck; 12-15-04 at 16:00.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Sep 2004
    Location
    London, UK
    Posts
    565
    Is this Windows sqlplus.exe or Unix sqlplus?

    SQL*Plus isn't great at this. If you set linesize to some large value, you find DESCRIBE doesn't work because it adjusts its output to fit linesize (Heaven knows why). iSQL*Plus can be better because its output is an HTML table.

Posting Permissions

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