Relationship between Contracts and Contract Terms
Summary:
We want to understand the joins between contracts and contract terms .
Content (please ensure you mask any confidential information):
We are using the following query and it is not giving the expected results .
SELECT otta.*
FROM
okc_terms_templates_all otta,
okc_k_headers_all_b okhab,
okc_allowed_tmpl_usages oatu,
okc_template_usages_h otu
WHERE
1 = 1
AND otta.org_id = okhab.org_id
AND oatu.contract_type_id= okhab.contract_type_id
AND oatu.template_id = otta.template_id
AND otu.document_number (+) = okhab.contract_number
--AND oatu.template_id(+) =otu.template_id
AND otu.template_id(+) =oatu.template_id
Tagged:
0