                          GROUP BY concept_code_1,
                                   b.concept_class_id
                          HAVING COUNT(1) > 1)
-AND   NOT REGEXP_LIKE (c.concept_name,b.concept_name) --Attribute is not a part of a name
+AND NOT REGEXP_LIKE (c.concept_name,b.concept_name) --Attribute is not a part of a name
 UNION
 SELECT concept_code_1,
        concept_code_2

    ON concept_id_2 = c2.concept_id
   AND c2.concept_class_id = 'Brand Name'
   AND c2.VOCABULARY_ID LIKE 'Rx%'
WHERE ((c2.invalid_reason IS NULL AND cr.invalid_reason IS NULL) OR (c.invalid_reason IS NOT NULL AND cr.invalid_reason IS NOT NULL AND cr.VALID_END_DATE < '02-Feb-2017'))
AND   REGEXP_LIKE (c.concept_name,c2.concept_name)
UNION
--Packs to BN

                            AND   concept_name LIKE '%Povidone-Iodine%');



COMMIT;

-- Delete 3 legged dogs
DELETE ds_stage
WHERE drug_concept_code IN (WITH a AS
