select r.requestId from tbl_TPM_Requests r with (nolock) inner join tbl_TPM_RequestTypes rt with (nolock) on rt.requestTypeId = r.requestTypeId and rt.ownerId = r.ownerId and rt.ownerType = r.ownerType where r.ownerId = and r.ownerType = and getDate() between dateadd( day, -1, r.startDate ) and dateadd( day, 1, r.endDate ) and rt.renewalWorkflowEnabled = 'Y' and rt.renewalWorkflowDays > 0 and r.renewalOption = '?' and dateadd( day, rt.renewalWorkflowDays, getDate() ) > r.termEnd and r.status = 'APPROVED' and not exists ( select * from tbl_TPM_Requests rr with (nolock) where rr.ownerId = r.ownerId and rr.ownerType = r.ownerType and rr.sourceRequestId = r.requestId ) and rt.requestTypeId = update tbl_TPM_Requests set renewalOption = 'PENDING', renewalOptionDate = , renewalOptionUserId = , renewalOptionWorkflowId = where requestId = and ownerid = and ownerType =
Company Name Start - End Type Sent To
#htmleditformat( primaryPartnerName )# #lsdateFormat( termStart, "MM/DD/YYYY" )# - #lsdateformat( termEnd, "MM/DD/YYYY" )# #htmleditformat( requestType )# #htmleditformat( qmd_renewalUser.email )# (#qmd_renewalRequest.requestId#)