outstandingWorkflowRequests log {ts '2024-10-10 09:28:49'} SQL declare @ownerId int = 276 ; declare @ownerType varchar(3) = 'MFR' ; declare @userId int = 4756179 ; with openRequests as ( select requestId, requestKey, toUserId, fromUserId, fromEmail, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate, requestAnnotation, requestSent, sendCount, case when toUserId = @userId then 'IN' else 'OUT' end as direction, cast( case when ownerId = @ownerId and ownerType = @ownerType then 1 else 0 end as bit ) as homeRequest from tbl_WRK_UserRequests with (nolock) where disposition = '?' and ownerId = @ownerId and ownerType = @ownerType and ( fromUserId = @userId or toUserId = @userId ) ), openRequestsFormatted as ( select r.*, f.firstName + ' ' + f.lastName as fromFullName, t.firstName + ' ' + t.lastName as toFullName from openRequests r left outer join tbl_Fspro_Members f with (nolock) on f.fspro_userId = r.fromUserId left outer join tbl_Fspro_Members t with (nolock) on t.fspro_userId = r.toUserId ), result as ( select * from openRequestsFormatted ) , result_preData as ( select * from result where ( 1 = 1 ) ) , result_data as ( select * , count(*) over() as fseRowCount from result_preData ) , result_return as ( select * from result_data where 1 = 1 order by requestTime offset 0 rows fetch next 10000000 rows only ) , result_result as ( select ( select count(*) from result_data ) as totalCount, ( select * from result_return for json auto, include_null_values ) as data ) select * from result_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-10 15:22:22'} SQL declare @ownerId int = 276 ; declare @ownerType varchar(3) = 'MFR' ; declare @userId int = 4756179 ; with openRequests as ( select requestId, requestKey, toUserId, fromUserId, fromEmail, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate, requestAnnotation, requestSent, sendCount, case when toUserId = @userId then 'IN' else 'OUT' end as direction, cast( case when ownerId = @ownerId and ownerType = @ownerType then 1 else 0 end as bit ) as homeRequest from tbl_WRK_UserRequests with (nolock) where disposition = '?' and ownerId = @ownerId and ownerType = @ownerType and ( fromUserId = @userId or toUserId = @userId ) ), openRequestsFormatted as ( select r.*, f.firstName + ' ' + f.lastName as fromFullName, t.firstName + ' ' + t.lastName as toFullName from openRequests r left outer join tbl_Fspro_Members f with (nolock) on f.fspro_userId = r.fromUserId left outer join tbl_Fspro_Members t with (nolock) on t.fspro_userId = r.toUserId ), result as ( select * from openRequestsFormatted ) , result_preData as ( select * from result where ( 1 = 1 ) ) , result_data as ( select * , count(*) over() as fseRowCount from result_preData ) , result_return as ( select * from result_data where 1 = 1 order by requestTime offset 0 rows fetch next 10000000 rows only ) , result_result as ( select ( select count(*) from result_data ) as totalCount, ( select * from result_return for json auto, include_null_values ) as data ) select * from result_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-10 15:22:46'} SQL declare @ownerId int = 276 ; declare @ownerType varchar(3) = 'MFR' ; declare @userId int = 4756179 ; with openRequests as ( select requestId, requestKey, toUserId, fromUserId, fromEmail, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate, requestAnnotation, requestSent, sendCount, case when toUserId = @userId then 'IN' else 'OUT' end as direction, cast( case when ownerId = @ownerId and ownerType = @ownerType then 1 else 0 end as bit ) as homeRequest from tbl_WRK_UserRequests with (nolock) where disposition = '?' and ownerId = @ownerId and ownerType = @ownerType and ( fromUserId = @userId or toUserId = @userId ) ), openRequestsFormatted as ( select r.*, f.firstName + ' ' + f.lastName as fromFullName, t.firstName + ' ' + t.lastName as toFullName from openRequests r left outer join tbl_Fspro_Members f with (nolock) on f.fspro_userId = r.fromUserId left outer join tbl_Fspro_Members t with (nolock) on t.fspro_userId = r.toUserId ), result as ( select * from openRequestsFormatted ) , result_preData as ( select * from result where ( 1 = 1 ) ) , result_data as ( select * , count(*) over() as fseRowCount from result_preData ) , result_return as ( select * from result_data where 1 = 1 order by requestTime offset 0 rows fetch next 10000000 rows only ) , result_result as ( select ( select count(*) from result_data ) as totalCount, ( select * from result_return for json auto, include_null_values ) as data ) select * from result_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-10 15:23:43'} SQL declare @ownerId int = 276 ; declare @ownerType varchar(3) = 'MFR' ; declare @userId int = 4756179 ; with openRequests as ( select requestId, requestKey, toUserId, fromUserId, fromEmail, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate, requestAnnotation, requestSent, sendCount, case when toUserId = @userId then 'IN' else 'OUT' end as direction, cast( case when ownerId = @ownerId and ownerType = @ownerType then 1 else 0 end as bit ) as homeRequest from tbl_WRK_UserRequests with (nolock) where disposition = '?' and ownerId = @ownerId and ownerType = @ownerType and ( fromUserId = @userId or toUserId = @userId ) ), openRequestsFormatted as ( select r.*, f.firstName + ' ' + f.lastName as fromFullName, t.firstName + ' ' + t.lastName as toFullName from openRequests r left outer join tbl_Fspro_Members f with (nolock) on f.fspro_userId = r.fromUserId left outer join tbl_Fspro_Members t with (nolock) on t.fspro_userId = r.toUserId ), result as ( select * from openRequestsFormatted ) , result_preData as ( select * from result where ( 1 = 1 ) ) , result_data as ( select * , count(*) over() as fseRowCount from result_preData ) , result_return as ( select * from result_data where 1 = 1 order by requestTime offset 0 rows fetch next 10000000 rows only ) , result_result as ( select ( select count(*) from result_data ) as totalCount, ( select * from result_return for json auto, include_null_values ) as data ) select * from result_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-10 15:30:15'} SQL declare @ownerId int = 276 ; declare @ownerType varchar(3) = 'MFR' ; declare @userId int = 4756179 ; with openRequests as ( select requestId, requestKey, toUserId, fromUserId, fromEmail, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate, requestAnnotation, requestSent, sendCount, case when toUserId = @userId then 'IN' else 'OUT' end as direction, cast( case when ownerId = @ownerId and ownerType = @ownerType then 1 else 0 end as bit ) as homeRequest from tbl_WRK_UserRequests with (nolock) where disposition = '?' and ownerId = @ownerId and ownerType = @ownerType and ( fromUserId = @userId or toUserId = @userId ) ), openRequestsFormatted as ( select r.*, f.firstName + ' ' + f.lastName as fromFullName, t.firstName + ' ' + t.lastName as toFullName from openRequests r left outer join tbl_Fspro_Members f with (nolock) on f.fspro_userId = r.fromUserId left outer join tbl_Fspro_Members t with (nolock) on t.fspro_userId = r.toUserId ), result as ( select * from openRequestsFormatted ) , result_preData as ( select * from result where ( 1 = 1 ) ) , result_data as ( select * , count(*) over() as fseRowCount from result_preData ) , result_return as ( select * from result_data where 1 = 1 order by requestTime offset 0 rows fetch next 10000000 rows only ) , result_result as ( select ( select count(*) from result_data ) as totalCount, ( select * from result_return for json auto, include_null_values ) as data ) select * from result_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-10 15:30:23'} SQL declare @ownerId int = 276 ; declare @ownerType varchar(3) = 'MFR' ; declare @userId int = 4756179 ; with openRequests as ( select requestId, requestKey, toUserId, fromUserId, fromEmail, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate, requestAnnotation, requestSent, sendCount, case when toUserId = @userId then 'IN' else 'OUT' end as direction, cast( case when ownerId = @ownerId and ownerType = @ownerType then 1 else 0 end as bit ) as homeRequest from tbl_WRK_UserRequests with (nolock) where disposition = '?' and ownerId = @ownerId and ownerType = @ownerType and ( fromUserId = @userId or toUserId = @userId ) ), openRequestsFormatted as ( select r.*, f.firstName + ' ' + f.lastName as fromFullName, t.firstName + ' ' + t.lastName as toFullName from openRequests r left outer join tbl_Fspro_Members f with (nolock) on f.fspro_userId = r.fromUserId left outer join tbl_Fspro_Members t with (nolock) on t.fspro_userId = r.toUserId ), result as ( select * from openRequestsFormatted ) , result_preData as ( select * from result where ( 1 = 1 ) ) , result_data as ( select * , count(*) over() as fseRowCount from result_preData ) , result_return as ( select * from result_data where 1 = 1 order by requestTime offset 0 rows fetch next 10000000 rows only ) , result_result as ( select ( select count(*) from result_data ) as totalCount, ( select * from result_return for json auto, include_null_values ) as data ) select * from result_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER {ts '2024-10-10 15:30:44'} SQL declare @ownerId int = 276 ; declare @ownerType varchar(3) = 'MFR' ; declare @userId int = 4756179 ; with openRequests as ( select requestId, requestKey, toUserId, fromUserId, fromEmail, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate, requestAnnotation, requestSent, sendCount, case when toUserId = @userId then 'IN' else 'OUT' end as direction, cast( case when ownerId = @ownerId and ownerType = @ownerType then 1 else 0 end as bit ) as homeRequest from tbl_WRK_UserRequests with (nolock) where disposition = '?' and ownerId = @ownerId and ownerType = @ownerType and ( fromUserId = @userId or toUserId = @userId ) ), openRequestsFormatted as ( select r.*, f.firstName + ' ' + f.lastName as fromFullName, t.firstName + ' ' + t.lastName as toFullName from openRequests r left outer join tbl_Fspro_Members f with (nolock) on f.fspro_userId = r.fromUserId left outer join tbl_Fspro_Members t with (nolock) on t.fspro_userId = r.toUserId ), result as ( select * from openRequestsFormatted ) , result_preData as ( select * from result where ( 1 = 1 ) ) , result_data as ( select * , count(*) over() as fseRowCount from result_preData ) , result_return as ( select * from result_data where 1 = 1 order by requestTime offset 0 rows fetch next 10000000 rows only ) , result_result as ( select ( select count(*) from result_data ) as totalCount, ( select * from result_return for json auto, include_null_values ) as data ) select * from result_result for JSON PATH, INCLUDE_NULL_VALUES, WITHOUT_ARRAY_WRAPPER