Directly:
UPDATE
customers c
join fees f on f.CustomerID = c.ID
join packages p on p.ID=f.PackageID
left join fees_history fh on f.ID = fh.ReferenceID
SET f.FromDate = ???
where c.ID='108239' and c.branch='664'
PS. left join fees_history fh on f.ID = fh.ReferenceID
does not affect the update and must be removed.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…