DEFINITIONS

Definitions More Info.
Definition ID2.007
TitleSQL
CategoryNOTES
Definitionbulk delete
Definition DescriptionDECLARE @i INT =1
WHILE(@i>0)
BEGIN
DELETE TOP (1000) FROM CompanyUserPermission
WHERE PermissionTypeId = 1
AND CompanyUserId IN (SELECT LoginId
FROM CloginDB WITH(NOLOCK)
WHERE LoginId In (SELECT CompanyUserId
FROM CompanyUserPermission WITH(NOLOCK)
WHERE PermissionTypeId = 1 GROUP BY CompanyUserId)
And LastloginDateN < Convert(varchar,DATEADD(DAY, -3, GetDate()), 112)
) SET @i=@@ROWCOUNT
END
RecordBycunay
Record Date04-03-2020 17:08:28
Düzenle
Kopyala
Sil