Rem Fichero   : otdesc.sql
Rem 
Rem Parametros : Niniguno
Rem
Rem RDBMS      : Oracle V8.x, V9.x, V10.x
Rem
Rem
Rem ===========================================================================================================
Rem
Rem Descripcion : Descripcion de un indice ORACLE Text
Rem
Rem
Rem ===========================================================================================================

SET LINESIZE 3500
SET PAGESIZE   50000
SET VERIFY     OFF
SET FEEDBACK   OFF

alter session set nls_numeric_characters = ',.';

DEFINE InputOwnerFilter = ' '
DEFINE InputIndexFilter = ' '
COLUMN Index_owner NOPRINT NEW_VALUE InputOwnerFilter
COLUMN Index_name  NOPRINT NEW_VALUE InputIndexFilter

SELECT decode(instr('&&1','.'), 0, user,  /*Default to current user.*/
                                upper(substr('&&1',1,instr('&&1','.')-1))) Index_owner,
       decode(instr('&&1','.'), 0, upper('&&1'),  /*Only the table name was passed in.*/
                                upper(substr('&&1',instr('&&1','.')+1))) Index_name
  FROM dual;

--@@header_dbinfo 107 DC

SET TERMOUT    ON
SET SERVEROUTPUT ON

DECLARE
V_LOB CLOB;
V_ITER INTEGER;
BEGIN
CTX_REPORT.DESCRIBE_INDEX('&InputOwnerFilter'||'.'||'&InputIndexFilter',v_lob);
V_ITER := TRUNC(LENGTH(V_LOB)/5000);
FOR I IN 0..V_ITER LOOP
   DBMS_OUTPUT.PUT_LINE(SUBSTR(V_LOB, I*5000 + 1, 5000));
END LOOP;
   
END;
/
