Sales Reprenentative in Service Contracts
I am creating a Serivce Contract report ,i need to add Sales represntative field in the report although i have added a Squb Query for the same but sometimes I don't get the reqired data i.e the exact name.
The subquery is
SELECT jrs_salesp.NAME
FROM jtf_rs_salesreps jrs_salesp,
okc_contacts scc,
okc_k_headers_all_b okhb2
WHERE jrs_salesp.salesrep_id = scc.object1_id1
AND okhb2.contract_number = okhb.contract_number
AND scc.cro_code = 'SALESPERSON'
AND scc.jtot_object1_code = 'OKX_SALEPERS'
AND scc.dnz_chr_id = okhb2.ID -- Added
AND jrs_salesp.org_id = okhb2.authoring_org_id ----- okhb2---okhb