--ABS-86229 / ABS-89343

----------WEARER-----------------
UPDATE WEARER W
   SET W.EMAILADDRESS = W.WEARER_ID || ' | ' || W.EMAILADDRESS
WHERE W.WEARER_ID IN
       (SELECT A.WEARER_ID
          FROM WEARER A
         WHERE A.EMAILADDRESS IN (SELECT B.EMAILADDRESS
                                    FROM WEARER B
                                   GROUP BY B.EMAILADDRESS
                                  HAVING COUNT(*) > 1));
COMMIT;

DROP INDEX XAK2WEARER;

CREATE UNIQUE INDEX XAK2WEARER ON WEARER (EMAILADDRESS ASC);