Re: Q: col widths in sql in ora 9

From: Frank <fvanbortel_at_netscape.net>
Date: Thu, 13 Nov 2003 21:38:11 +0100
Message-ID: <bp0pkh$ckj$1_at_news2.tilbu1.nb.home.nl>


[Quoted] Malcolm Dew-Jones wrote:

> I wish to control the colum widths of data in numerous utilitiy queries I
> often run while examining various databases.
>
> In the past I simply used substr to limit the width.
>
> For example
>
> select
> substr( DB_LINK,1,30) DB_LINK
> ,substr( USERNAME,1,30) USERNAME
> ,substr( PASSWORD,1,30) PASSWORD
> ,substr( HOST,1,30) HOST
> from user_db_links ;
>
> This produces an output of about 120 chars wide -- except when I connect
> to one specific server which prints headers that are apparently the full
> width of the column instead of the width of the selected data. The only
> difference I can see is that the server is version 9 whereas all the other
> servers are version 8 (or less, but I no longer access any thing less than
> 8).
>
> I type "column" and various defaults are displayed, but I see no
> difference based on which server I am connected to.
>
> I certainly don't wish to have to define individual columm headers for all
> these queries. In addition to having to change a bunch of scripts, it
> also means that each script will then potentially be altering the settings
> used by other queries.
>
> Is there some global technique to fix this apparent incompatibility?
>
> define shows
>
> DEFINE _SQLPLUS_RELEASE = "800060000" (CHAR)
> DEFINE _O_VERSION = "Oracle9i Enterprise Edition Release 9.2.0.2.0 -
> Production
>
Read up SQL*Plus Reference Manual:
COL[umn] <column_name> FOR[mat] A<width>|9999999

-- 
Regards, Frank van Bortel
Received on Thu Nov 13 2003 - 21:38:11 CET

Original text of this message