Fetch template name based on payment_id
Below is the query I am using to fetch the template name based on my payment_id parameter. But I am getting multiple template names for single paymen_id. Kindly assist.
SELECT DISTINCT ipa.PAYMENT_PROCESS_REQUEST_NAME, apt.template_name --,ipa.payment_id,apt.template_id
FROM IBY_PAYMENTS_ALL ipa, ap_payment_templates apt
WHERE 1 = 1
AND apt.payment_profile_id = ipa.payment_profile_id
AND ipa.payment_id = 'any-payment_id'