/****** Script for SelectTopNRows command from SSMS ******/
SELECT TOP 1000 [TaskID]
,[SID]
,[AllowRead]
,[AllowAdmin]
,[ShareByUser]
,[CreateDate]
,[CreateBy]
,[ID]
,[ExtYear]
,[ExtDeleted]
FROM [BPMDB].[dbo].[BPMSecurityTACL]
--WHERE TaskId=10225
WHERE TaskId IN (SELECT TaskId FROM [BPMDB].[dbo].[BPMInstTasks] WHERE ProcessName='Travel')
AND SID='S_GS_90674E5E-AC3C-4032-9EDF-7477F2247542'
ORDER BY CreateDate DESC
UPDATE [BPMDB].[dbo].[BPMSecurityTACL]
SET AllowRead=0
WHERE TaskId IN (SELECT TaskId FROM [BPMDB].[dbo].[BPMInstTasks] WHERE ProcessName='Travel')
AND SID='S_GS_90674E5E-AC3C-4032-9EDF-7477F2247542'