/* ************************************************ */
/*                                                  */
/* format the report:                               */
/*        DBAINDMFG - Index Column Report           */
/*                                                  */
/* name:    @c:\oracle\sql\dbaindmf.sql             */
/* date:    12-MAY-95                               */
/* creator: Rick Kupcunas (Oracle)                  */
/*                                                  */
/* ************************************************ */

set feedback  off
set WRAP      off
set pagesize  60
set linesize  80 
set space     3
set newpage   0
set trimout   on
set verify    on
set underline =
set echo      off
set termout   off

whenever sqlerror exit failure
spool dbaindmfg.lst;

ttitle left 'PAGE:' sql.pno format 999 - 
center 'DBAINDMFG - Index Column Report' -
right CWS_DATE skip 2

 column index_name			format A20 heading 'INDEX'
 column index_owner                     format A5  HEADING 'OWNER'
 column table_name			format A20 heading 'TABLE'
 column column_name			format A20 heading 'COLUMN'

 break   on  index_name skip 1

select index_name,
     index_owner,
     table_name,
     COLUMN_NAME
from sys.dba_ind_columns
where index_owner = '&&INDEX_OWNER'
order by index_name,column_position;

undefine &INDEX_OWNER;
spool off;
exit
