rem
rem report DN check data table
rem
CREATE INDEX dn_check_ind ON dn_check(dn)
 UNRECOVERABLE PARALLEL 2
 TABLESPACE OLTS_DEFAULT;
COLUMN DN FORMAT a35
COLUMN NormDN FORMAT a35
SET HEADING OFF
SET TIMING OFF
SET FEEDBACK OFF
SET ECHO OFF
SET PAGES 0
SET NEWPAGE 0
SET SPACE 0
SPOOL duplicateDN.log
SELECT DN, NormDN
 FROM dn_check
 WHERE NormDN IN ( SELECT NormDN 
                    FROM dn_check
                    GROUP BY NormDN 
                    HAVING COUNT(*) > 1)
 ORDER BY 1, 2;
SPOOL OFF;
DROP INDEX dn_check_ind;
DROP TABLE dn_check;
COMMIT;
EXIT;
