Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Misaligned SQLPlus output

Jibba JabbaMar 25 2013 — edited Mar 27 2013
Hi,
Yes, I know this should go in the SQLPlus (tumbleweed) forum, but somebody there asked exactly the same question over a month ago and it still hasn't received even one attempted reply!

So, simple question; why is the following output misaligned? Specifically, the value 14 for SAMPLE_SIZE is placed in the middle of its column, and consequently LAST_ANALYZED (21-feb-13) is shoved into the SAMPLE_SIZE column:
  1  select column_name, data_type, avg_col_len, density, num_distinct NDV, histogram, num_buckets buckets, sample_
size, last_analyzed,data_type
  2  from dba_tab_cols
  3  where owner  = 'SCOTT'
  4  and table_name = 'EMP'
  5  and column_name = 'EMPNO'
  6* order by internal_column_id
SYS@ORCL> /

COLUMN_NAME               DATA_TYPE  AVG_COL_LEN     DENSITY          NDV HISTOGRAM       BUCKETS SAMPLE_SIZE LAST_
ANAL DATA_TYPE
------------------------- ---------- ----------- ----------- ------------ --------------- ------- ----------- -----
---- ----------
EMPNO                     NUMBER               4  .071428571           14 NONE                  1       14 21-FEB-1
3 NUMBER

SYS@ORCL>
Btw, the **** above should read A N A L (without the spaces) as in LAST_ANALYZED but a rather enthusiastic filter seems to be at work.


Second question - I was wondering if I had entered a COLUMN ... FORMAT command that had screwed things up..but as far as I can tell, there is no way to retrieve the list of column formats that SQLPlus is currently using - or is there?

*****Edit - ignore the second question - I just found that you can simply type
COLUMN
to get a listing of all column formatting instructions currently in use. I checked to see if SAMPLE_SIZE has any formatting applied to it and it does not.




Many thanks,
Jason

Edited by: Jason_942375 on Mar 25, 2013 9:53 PM

Edited by: Jason_942375 on Mar 25, 2013 9:55 PM
This post has been answered by SomeoneElse on Mar 26 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2013
Added on Mar 25 2013
15 comments
1,699 views