This discussion is archived
5 Replies Latest reply: Nov 18, 2006 3:35 PM by 2889 RSS

SQLPLUS linesize/pagesize configuration

545732 Newbie
Currently Being Moderated
i am using Linux FEDORA CORE 4
I have got an output which looks like this
SQL> select * from client;

CLIENT_NO NAME ADDRESS PHONE POSTCODE CONTACT T PLACE_CNT
---------- ------------------------------ ------------------------------------------------------------------------------------------------------------------------ -------------------- ---------- ------------------------------ - ----------
1 Mega-Big Software House The Industrial Park, Smalltown, Near Bristol 0117 9123456 BS88 8SB Mr Big A 5
2 Little Cottage Software The Cottage, Small Village, Brindling 01345 876543 LC99 9AE Pete C 1
3 Big Defence Company Moribund-in-the-Bog, East Morishire 01545 871 5820 MB23 9AG Mr. J. Smith A 0
4 Medium Software Ltd 12 Middle Street, Glebe, Bontsal, Popshire 01934 354 9818 BO9 7HY George Smiley B 4
5 The Average Software Co. 45 High Street, Oretown, Bundlington, Mopshire 01564 253 3462 BU16 7WG Daniel Jones B 0
6 Womens Software Co-operative The Old Hall, Little Buggins, Spotshire 01903 3566 LB8 6TH Mary Paterson B 2
7 The Difficult to Satisfy Co Off the High Street, Elseshire 01666 666 EL66 6LE Mr Pain B 0

7 rows selected.
HOW CAN I ARRANGE IT ?????

Message was edited by:
Sparrow
  • 1. Re: SQLPLUS linesize/pagesize configuration
    SomeoneElse Guru
    Currently Being Moderated
    HOW CAN I ARRANGE IT ?????
    How do you want to arrange it?
  • 2. Re: SQLPLUS linesize/pagesize configuration
    10438 Newbie
    Currently Being Moderated
    first do

    desc clients

    will give you the columns in your table.

    so you can select columns you need it or select all.

         SQL> COLUMN name FORMAT A8,
    SQL> COLUMN address FORMAT A15

    If a name is longer than 8 characters, the remaining is displayed at the second line (or several lines)

    ** The set command can be used to change the default number of lines per page (14) and the number of characters per line (80).
    For example, to set the number of lines per page to 60, use the following command:

         SQL> SET PAGESIZE 60

    All formatting remain active until they are cleared or reset or after you exit from SQL*Plus.
         SQL> CLEAR COLUMN

    DN
  • 3. Re: SQLPLUS linesize/pagesize configuration
    2889 Journeyer
    Currently Being Moderated
    clear break
    clear comp
    clear col

    set pagesize 0
    set linesize 9999
    set trimspool on
    set tab off
    set echo off
    set feedback off
    set recsep off


    even better to lookup documentation :

    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14357/toc.htm
  • 4. Re: SQLPLUS linesize/pagesize configuration
    407846 Newbie
    Currently Being Moderated
    sometimes I ask myself why there has never been some work on command line editing and automatic formatting in sqlplus. Many developers (many of those at oracle for example) are not using sqlplus standalone because it is a pain. They use(d) to have an Emacs as a frontend (at least some years ago, maybe now they are using something different).

    If you really need to work much with sqlplus in character terminals (instead of Quest's Toad, Oracle's SqlDeveloper or this web based isql in graphic terminals) you can use the sql mode of Emacs. Maybe you will start to build lot's of Elisp tools then and sooner or later you will have it easy to do your daily job pressing some weird Emacs shortcuts ;-)
    Cheers
    Karsten
  • 5. Re: SQLPLUS linesize/pagesize configuration
    2889 Journeyer
    Currently Being Moderated
    right,

    use vi (even on windows, DOS interface is best), have some standard sql-files ready (defining some settings) and you'll run circles around all those shiny tools : Quest's Toad, Oracle's SqlDeveloper, isqlplus, whatever ;-)

    AND using basic sqlplus interface, you are able to work at any customer's place, on all Operating Systems, (don't expect installed tools, don't expect internet access).

    PS :
    der gute Handwerker hat Hammer, Meißel, Säge, Brustleier und Kreide zur Hand. ;-)