select count(*) as totalRequests
from tbl_TPM_RequestApprovers ra
inner join tbl_TPM_Requests req
on req.requestid = ra.requestid
where ra.ownerid =
and ra.ownertype =
and ra.approverUserId =
and ra.approverRole = 'APPROVER'
and ra.status =
select requestId, ownerId, ownerType, requestKey, toUserId, fromUserId, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate
from tbl_WRK_UserRequests
where ownerId =
and ownerType =
and disposition = '?'
and fromUserId =
and toUserId <>
select requestId, ownerId, ownerType, requestKey, toUserId, fromUserId, requestURL, handlerTemplatePath, requestTime, disposition, config, requestTitle, requestSubject, response, responseTime, requestTrackingCode, responseDueDate
from tbl_WRK_UserRequests
where ownerId =
and ownerType =
and disposition = '?'
and toUserId =