Column headers displayed to full length despite using substr [message #407316] |
Tue, 09 June 2009 10:07 |
proudpal
Messages: 1 Registered: June 2009
|
Junior Member |
|
|
Hello,
Our DB was just upgraded from 10 to 11. We are still using the same SQL*PLUS editor though.
Right now, when we run our queries (canned queries) the display is totally awful. It displays the whole width of each column.
For example :
SUBSTR(NAME,1,23)
--------------------------------------------------
University of Phoenix
All queries display is messed up right now.
I checked different settings and nothign works.
Any ideas on what needs to be done?
Here is a display of the version of the products:
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jun 9 10:02:39 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
Thank you
|
|
|
Re: Column headers displayed to full length despite using substr [message #407331 is a reply to message #407316] |
Tue, 09 June 2009 12:31 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
SQL> select substr(dname, 1, 10) from dept where rownum < 3;
SUBSTR(DNA
----------
ACCOUNTING
RESEARCH
SQL> select substr(dname, 1, 10) New_Dname from dept where rownum < 3;
NEW_DNAME
----------
ACCOUNTING
RESEARCH
SQL> column New_Dname format A20 heading "D-Name"
SQL> select substr(dname, 1, 10) New_Dname from dept where rownum < 3;
D-Name
--------------------
ACCOUNTING
RESEARCH
SQL>
The behavior you describe is default. The heading formats and col widths must have been customized in some script (usually directly in the SQL script itself). Look for login.sql and glogin.sql in the old sqlplus installation.
[Updated on: Tue, 09 June 2009 12:37] Report message to a moderator
|
|
|