79126190

Date: 2024-10-25 14:48:58
Score: 1.5
Natty:
Report link

here is where the good old subquery works, and is very simple

UPDATE UserAssesment set AssessmentDate = (select top 1 comp.AssessmentDate from vw_CompletedAssessments comp where ua.NatId = comp.NatId and ua.FamilyName = comp.ClientLastName and ua.GivenName = comp.ClientFirstName order by comp.date desc ) WHERE ua.HasCompletedAssessment <> 0

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: gokup