UPDATE DB_OSP_YEARLY_BREAKDOWN
SET Full_Adjusted = Full_Adjusted + 1
WHERE Ndx IN (
	SELECT DISTINCT yb.Ndx FROM DB_OSP_YEARLY_BREAKDOWN yb
	INNER JOIN DB_OSP_PLANS p
	ON p.Ndx = yb.Parent_Id
	AND p.Plan_Type = 'Holiday'
	INNER JOIN REF_OSP_PLAN_TEMPLATES t
	ON t.Plan_Id = p.Plan_Id
	AND t.Plan_Name = 'Titan Holiday - Before November 2009'
	AND yb.Year = 2021
	INNER JOIN LNK_EMPLOYEE_CONTRACT lec
	ON lec.Right_Join = p.Master_Id
	AND '12 Apr 2021' BETWEEN lec.Start_Date AND ISNULL(lec.End_Date, '31 dec 2499')
	)
