Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2006

    Unhappy Unanswered: sqlplus automatic column width question

    Is there a way to automatically make the column width at least as long as the number of characters in the column name. For instance if the col name is cde_status and it only contains one character, the column heading will only show "c". I know I can use the "col cde_status format A10", but I'm hoping the people at Oracle are at least smart enough to provide an automatic width option so the whole col name will appear in the heading. Does anyone have the answer? thank you.
    Last edited by bljkqueen; 07-20-06 at 18:19. Reason: change title

  2. #2
    Join Date
    May 2004
    BA [ARG]
    The column name display can't be that important.
    If you're too concern about it, why don't you set the width a little bit longer to include the column name?

  3. #3
    Join Date
    Jul 2006
    If you are research lots of tables and they have lots of fields each containing short values, then you have to constantly flip back and forth between desc, and your query (select * from table) to see the field names. You have to mentally count into the desc to get the real field name of 23rd field that is showing you "C" in the heading. It is a hugh pain in the rear. Are you suggesting there is another option to the column command that will work for all fields, i.e. something like col * format A20.

  4. #4
    Join Date
    Nov 2003
    Provided Answers: 8
    As much as I like SQL*Plus for running automated scripts, for tasks like that I use a decent GUI front end to examine the contents of tables - which of course does not have this limit

  5. #5
    Join Date
    Jul 2003
    you could use TOAD.
    otherwise, I always add the column formats to my glogin.sql file as I set them.
    this way the column-widths get autoset every time I log in and I only have
    to set them once.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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