Is it possible to combine this two into one?
cmp.category=case when cmp.category='' OR cmp.category IS NULL OR cmp.category IS NOT NULL then dupl.category else cmp.category end,
cmp.category=case when cmp.status!=1 and cmp.status!=2 then dupl.category else cmp.category end,