-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #411 from SkillsFundingAgency/DPP-1661_Ignore_Dloc…
…k07_If_Also_Dlock09 Ignores dlock07 datalocks if also dlock09
- Loading branch information
Showing
4 changed files
with
79 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
....Database/AdhocScripts/Support/DPP-1661/DPP-1661_Remove_DataLock_7_if_also_Datalock_9.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
Script to remove data locks with price error code if the user has also had a start date data lock | ||
We do not have dlock 09 stored in commitments, so have to establish the existence of one by | ||
inferring it where the effective from date in the ILR is before the course start date | ||
If the user attempts to triage a data lock in this state, they receive an exception. | ||
*/ | ||
|
||
|
||
update dl | ||
set dl.IsExpired = 1 | ||
from Apprenticeship a | ||
join DataLockStatus dl on dl.ApprenticeshipId = a.Id | ||
where | ||
[Status]=2 and (ErrorCode & 64 = 64) and IsResolved=0 and IsExpired=0 and EventStatus<>3 | ||
and dl.IlrEffectiveFromDate < a.StartDate | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters