| SQL |
select c.claimId, c.claimType, c.claimDate, c.claimStatus, c.claimDescription, c.claimAmount, c.createUserId, c.createDate, c.updateUserId, c.updateDate, c.partnerId, c.partnerType, c.requestId,
c.verifiedAmount, c.adjustmentAmount, c.claimStatusComment, c.claimStatusDate, c.claimStatusUserId, c.claimPeriodStart, c.claimPeriodEnd, c.claimInvoice, c.claimRef, c.adminFee,
c.statusReasonId, c.payeeId, c.reconciledAmount, c.claimedRequestId, c.partnerPayableId, c.volumeBased, c.checkIssued, c.calcVersion, c.pod, c.verificationVariance, c.readyToAudit, c.clearingTs,
c.deductionRef, c.deductionDate, c.processorUserId, c.readyToAudit, c.edi, c.ediReady, coalesce( c.accountingClaimId, 0 ) accountingClaimId, c.readyToClear, c.readyToClearMessage, c.currencyCode, c.currencyConversionRate,
c.foreignClaimAmount as foreignClaimAmount, c.historical
, c.archived, c.archiveDate
, ( c.claimAmount - ( coalesce( c.verifiedAmount, 0.0 ) + coalesce( c.adminFee, 0.0 ))) variance
, c.mappingCompleted, c.mappingChecked
from tbl_TPM_Claims c with (nolock)
where c.ownerId = 1
and c.ownerType = 'MFR'
and c.claimId = ? |