--This script sets the "Use Change Points" flag for design groups that look like they are currently --mapped to a product via a group code and cement level. UPDATE DesignGroups SET DesignGroups.UseChangePoints = 1 FROM DesignGroups INNER JOIN DesignProductRelation ON DesignGroups.Code = DesignProductRelation.DesignGroup WHERE ISNULL(DesignProductRelation.DesignMix, '') = '' AND ISNULL(DesignProductRelation.DesignCement,0) > 0 AND ISNULL(DesignGroups.UseChangePoints,0) = 0