You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AS HasDiagnostic, dbo.CheckCustomisationSectionHasLearning(p.CustomisationID, 0) AS HasLearning,
26
+
COALESCE
27
+
((SELECTCOUNT(Passes) AS Passes
28
+
FROM (SELECTCOUNT(AssessAttemptID) AS Passes
29
+
FROM AssessAttempts AS aa
30
+
WHERE (CandidateID =p.CandidateID) AND (CustomisationID =p.CustomisationID) AND (Status=1)
31
+
GROUP BY SectionNumber) AS derivedtbl_2), 0) AS Passes,
32
+
(SELECTCOUNT(SectionID) AS Sections
33
+
FROM Sections AS s
34
+
WHERE (ApplicationID =cu.ApplicationID)) AS Sections, p.CompleteByDate, CAST(CASEWHENp.CompleteByDateISNULLTHEN0WHENp.CompleteByDate<getDate()
35
+
THEN2WHENp.CompleteByDate<DATEADD(M, +1, getDate()) THEN1ELSE0ENDASINT) AS OverDue, p.EnrollmentMethodID, dbo.GetCohortGroupCustomisationID(p.ProgressID) AS GroupCustomisationID, p.SupervisorAdminID
36
+
37
+
FROM Progress AS p INNER JOIN
38
+
Customisations AS cu ONp.CustomisationID=cu.CustomisationIDINNER JOIN
39
+
Applications AS a ONcu.ApplicationID=a.ApplicationID
40
+
WHERE (p.CompletedISNULL) AND (p.RemovedDateISNULL) AND (p.CandidateID= @CandidateID)AND (cu.CustomisationName<>'ESR') AND (a.ArchivedDateISNULL) AND (cu.Active=1) AND (p.SubmittedTime>DATEADD(M, -6, getDate()) ORNOTp.CompleteByDateISNULL)
0 commit comments