Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> sqlplus...automatically setting a column width?

sqlplus...automatically setting a column width?

From: Mark Harrison <mh_at_pixar.com>
Date: Fri, 30 Jun 2006 06:02:10 GMT
Message-ID: <C73pg.75799$4L1.34059@newssvr11.news.prodigy.com>


I have some really wide varchar columns, but the data is not very long. Is there a way to automatically combine these two statements, to set the column width to the width of the longest string?

SQL> select max(length(x2)) from foo;

MAX(LENGTH(X2))


             32

SQL> column x2 format a32

Many TIA!
Mark

-- 
Mark Harrison
Pixar Animation Studios
Received on Fri Jun 30 2006 - 01:02:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US