select claimId from tbl_TPM_Claims where ownerId = @ownerId and ownerType = @ownerType and claimId = and reconciledDate is not null
#encodeForHTML( _r.sql )#
#lsnumberformat( _r.recordCount )# rows update tbl_TPM_Claims set reconciledAmount = null, reconciledDate = null, checkRequested = '?', checkIssued = '?', checkDate = null, checkNbr = null, checkAmount = null, checkRequestNbr = null, checkRequestedDate = null, checkRequestedBy = null, readyToClear = 'N' where ownerId = @ownerId and ownerType = @ownerType and claimId =
#encodeForHTML( _r.sql )#
#lsnumberformat( _r.recordCount )# rows delete from tbl_TPM_ReconciliationHistory where ownerId = @ownerId and ownerType = @ownerType and claimId =
#encodeForHTML( _r.sql )#
#lsnumberformat( _r.recordCount )# rows delete from tbl_TPM_CheckRequests where ownerId = @ownerId and ownerType = @ownerType and claimId =
#encodeForHTML( _r.sql )#
#lsnumberformat( _r.recordCount )# rows update tbl_TPM_ClaimContracts set status = 'OPEN', auditorUserId = null, reconciled = 'N', reconciledDate = null where ownerId = @ownerId and ownerType = @ownerType and claimId =
#encodeForHTML( _r.sql )#
#lsnumberformat( _r.recordCount )# rows update tbl_TPM_Contracts set flaggedForRecalc = 'Y', flaggedForRecalcTime = where ownerId = @ownerId and ownerType = @ownerType and contractId in ( select r.contractId from tbl_TPM_ClaimContracts cc inner join tbl_TPM_Requests r on r.requestId = cc.requestId and r.ownerId = cc.ownerId and r.ownerType = cc.ownerType where cc.ownerId = @ownerId and cc.ownerType = @ownerType and cc.claimId = )
#encodeForHTML( _r.sql )#
#lsnumberformat( _r.recordCount )# rows

Rolling Back

Applied