RE: Determining char/varchar2 column length

  • From: "Powell, Mark D" <mark.powell@xxxxxxx>
  • To: "'oracle-l@xxxxxxxxxxxxx'" <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 14 Jul 2004 16:29:22 -0400

Adam, are you asking about the length of the actual data stored or the
declared length of the column?

The length function is available for the first item.

The data_length column of dba_tab_columns appears to give me the defined
column length for varchar columns in both 8.1 and 9.2

Perhaps, I do not understand what you are really asking.

HTH -- Mark D Powell --


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Adam Donahue
Sent: Wednesday, July 14, 2004 3:30 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Determining char/varchar2 column length


Folks,

Is there a single query or builtin PL/SQL routine that allows one to 
calculate the (character) length of a column that works for both 8i and 
9i? 

For 8i, character length = data_length

For 9i, character length = char_length (which /may/ equal data_length 
depending on the value of char_used)

Question, again, is whether there's a single query that can be run 
against both databases to accurately determine the length of a 
character-based column.

Thanks,

Adam

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: