Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003

    Unanswered: Sqlplus display problem

    Hi people,

    I need to ouput to printer a select but the problem is that the output is too large so it's very hard to read. I have many varchar(20) fields so sqlplus will display 20 characters long fields out of them, but most of the data inside these varchar(20) fields is actually 10 characters long. Is there a way to tell sql to limit the width of the displayed fields? I don't want to change the datatype just for an output.

    Thanks in advance,

    Best regards,

  2. #2
    Join Date
    Apr 2004
    use the column command - it's in the sqlplus reference manual (not the sql language guide)
    Give a man a fish, you feed him for a day. Club him over the head with a fish, he'll leave you alone.

  3. #3
    Join Date
    Dec 2003
    Oklahoma, USA
    Sure there is -- syntax is COL[UMN] <column name> FORMAT <type><length>

    For character based columns, it looks like this:

    COL column1 FORMAT a10;
    SELECT column1
    FROM table1;
    save disk space, use smaller fonts

  4. #4
    Join Date
    Feb 2003
    Thanks guys :-)

Posting Permissions

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