delete from ProductColorXTAB
from color c (nolock)
inner join ProductColorXTAB pcx (nolock) on c.ColorID = pcx.ColorID
where AutoDayColor = 0 and (YieldFilterColor = 0 OR ISNULL((SELECT KeyValue From Hotelsetup where SearchKey = 'YieldEnabled'), '0') = '0')
