dimanche 19 avril 2015

column "ecpservicelinepayment_payment_amount" does not exist .how to solve this error

If i added where eCPClaim_Total_Claim_Charge = eCPServiceLinePayment_Payment_Amount in below query i am getting error and error is column ecpservicelinepayment_payment_amount,how to solve this error.

SELECT eCPClaim_Total_Claim_Charge
FROM tbl_eCPClaim tc
LEFT JOIN LATERAL(SELECT SUM(COALESCE(eCPServiceLinePayment_Payment_Amount, 0)) FROM tbl_eCPServiceLinePayment slp WHERE slp.eCPRemit_Key IN (
SELECT eCPClaimResponseSummary_Response_Key
FROM tbl_eCPClaimResponseSummary
WHERE eCPClaim_Key = tc.eCPClaim_Key
AND eCPClaimResponseSummary_Response_Type = 205
AND slp.eCPServiceline_Key IN (
SELECT eCPServiceline_Key
FROM tbl_eCPServiceLine
WHERE eCPClaim_Key = tc.eCPClaim_Key
)) a ON tc.eCPClaim_Key = tc.eCPClaim_Key
WHERE eCPClaim_Total_Claim_Charge = eCPServiceLinePayment_Payment_Amount limit 100

Aucun commentaire:

Enregistrer un commentaire