Reading and converting ALL_TAB_COL_STATISTICS

From: Martin Klier <>
Date: Mon, 9 Nov 2009 15:22:40 +0100
Message-ID: <>

Dear list,

how can I convert the raw(32) columns LOW_VALUE and HIGH_VALUE of ALL_TAB_COL_STATISTICS to their decimal value? TO_NUMBER(rawtohex
(high_value),'XXXXXXXX') gives me not the value I expect (stats are recent)
and in the table min(id) is 1 and max(id) is 8 million). DUMPing the values
(see last part of the SQL below) does not give me any better idea....

SQL> select column_name, rawtohex(low_value),TO_NUMBER(rawtohex

  from user_tab_col_statistics
  where table_name='WILLI'


------------------------------ ----------------------
ID                             C102
DESCRIPTION                    616161
STATUS                         C102


SQL> select max(id) from willi;



SQL> select min(id) from willi;



SQL> select dump(LOW_VALUE) from user_tab_col_statistics where table_name='WILLI';


Typ=23 Len=2: 193,2
Typ=23 Len=3: 97,97,97
Typ=23 Len=2: 193,2

SQL> Any idea is greatly appreciated. Thanks in advance!

Mit freundlichem Gruß

Martin Klier
Senior Oracle Database Administrator

Klug GmbH integrierte Systeme
Lindenweg 13, D-92552 Teunz
Tel.:  +49 9671/9216-245
Fax.: +49 9671/9216-112

Geschäftsführer: Johann Klug, Roman Sorgenfrei
Sitz der Gesellschaft: Teunz, USt-ID-Nr. DE175481608,
HRB Nr. 2037, Amtsgericht Amberg

Received on Mon Nov 09 2009 - 08:22:40 CST

Original text of this message