DBA Data[Home] [Help]

APPS.OKC_XPRT_REP_INT_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 84

     SELECT orc.contract_version_num,
       orc.contract_name,
       orc.contract_number,
       orc.contract_type,
       orc.contract_effective_date,
       orc.contract_expiration_date,
       orc.amount,
       fl.meaning contract_status,
       (SELECT name
        FROM   Hr_all_organization_units
        WHERE  organization_id = orc.org_id)   contract_organization,
       (SELECT nvl(pf.full_name, fu.user_name)
        FROM   Per_all_people_f   pf,
               fnd_user    fu
        WHERE  fu.user_id = orc.owner_id
        AND    pf.person_id (+) = fu.employee_id
        AND   (fu.employee_id IS NULL OR pf.effective_start_date = (SELECT MAX(effective_start_date)
                                                                    FROM   per_all_people_f
                                                                    WHERE  person_id = fu.employee_id)))  contract_owner,
       obd.name    contract_type_name,
       fl1.meaning  intent,
       (SELECT meaning
        FROM   okc_lookups_v
        WHERE  lookup_type = 'OKC_RISK_LEVELS'
        AND    lookup_code = orc.OVERALL_RISK_CODE)  overall_risk,
       (SELECT meaning
        FROM   okc_lookups_v
        WHERE  lookup_type = 'OKC_AUTHORING_PARTY'
        AND    lookup_code = orc.AUTHORING_PARTY_CODE)  authoring_party,
       Curr.Name currency_name,
       orc.reference_document_type,
       orc.reference_document_number
    FROM OKC_REP_CONTRACTS_ALL orc,
     okc_lookups_v  fl,
     okc_bus_doc_types_vl  obd,
     okc_lookups_v  fl1,
     Fnd_Currencies_Tl Curr
    WHERE orc.contract_id = p_doc_id
    AND   fl.lookup_type = 'OKC_REP_CONTRACT_STATUSES'
    AND   fl.lookup_code = orc.CONTRACT_STATUS_CODE
    AND   obd.document_type = orc.Contract_Type
    AND   fl1.lookup_type = 'OKC_REP_CONTRACT_INTENTS'
    AND   fl1.lookup_code = obd.intent
    AND   orc.Currency_Code = Curr.Currency_Code (+)
    AND   Curr.Language (+) = Userenv('LANG');