My Oracle Support Banner

Column Header is getting Truncated to 30 while Selecting from Dual (Doc ID 359055.1)

Last updated on AUGUST 12, 2020

Applies to:

SQL*Plus - Version 10.2.0.1 and later
Information in this document applies to any platform.

Symptoms

The column header is truncated to 30 characters when making a simple select of a text from dual table.
No error messages are returned.

The 9.2.x version of SQLPlus does not encounter the problem.

Steps to reproduce the issue:

SQL> alter system set "_adjust_literal_replacement"=true;
Then run the following query:
SQL> select 'TABLE : CUSTOMERDATA/CUSTOMERODER' from dual;
'TABLE:CUSTOMERDATA/CUSTOMER
---------------------------------
TABLE : CUSTOMERDATA/CUSTOMERODER

Notice that the header is truncated.

Then  checked in the same transaction:
SQL> select 'TABLE : CUSTOMERDATA/CUSTOMERODER' from dual;
'TABLE:CUSTOMERDATA/CUSTOME
---------------------------------
TABLE : CUSTOMERDATA/CUSTOMERODER

Notice that the literal string contains one extra space, which somehow influenced the header in that a letter is missing at the end.

Finally checked:
SQL> select 'TABLE:CUSTOMERDATA/CUSTOMERODER' from dual;
'TABLE:CUSTOMERDATA/CUSTOMEROD
---------------------------------
TABLE : CUSTOMERDATA/CUSTOMERODER

Removed the 2 spaces from the literal text, and this added 2 letters to the end of the header.
So somehow the header is influenced by the amount of white space in the literal text queried from the database.

This problem does not reproduce in 9.2.0.x. In 9.2 the header is displayed with exactly the same width as the data
queried.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.