Acceptance Criteria :
Delete EmployeeID is null and Age older than 7 days Delete FCC
ComplianceHublogTeamsData Groupids is null and age>7 --Delete Supervised Hove
the groupid) Tearms-Compliance records older than 30 days delete FCC
ComplianceHubLogTeamsData where null Groupids-compliance-risk-res01-
ngejoumal-prod and age 30
;With Superwiseddata as (Select * from Fcc_ComplianceHubTeamsData where GroupIds
LIKE '%' +@TeamsJDL+ '%') Delete Superseideddata where
DateDiff(DD,Rundate,Getdate())>30
;With SupervisedData as (Select from dbo. FCC ComplianceHubLogTeamsData where
GroupIds LIKE +'%'@Teams JDL+ '%') NotSupervisedData as
Delete Superwised Data
Declare @TeamsJDL VARCHAR(90)=Select LTRIM(RTRIM(ConfigValue)))
from Fcc_ConfigData where Configtame='TeamsJDL')
IF(ISNULL(@TeamsJDL,'')='')
Throw 5100, 'Value not found in the config table',1;
Delete Superwised Data
Delete NonSuperwised Data
(Select from dbo FCC
ComplianceHubLogTeamsData HERE Transcript_ID NOT TH(Select Transcript ID FROM
SupervisedData Delete NotSupervisedData WHERE DATEDIFY DD, RunDate, ETDATE()) >
7
Bro give us some information like SQL joins
ReplyDeleteOk
Delete