Thursday, 19 November 2015

Query Project Agreement with Project Details

SELECT d.customer_id,
   ppc.customer_name,
       d.agreement_type,
       d.description agreement_desc,
       d.CUSTOMER_ORDER_NUMBER,
      AGREEMENT_NUM,TRUNC(D.CREATION_DATE) AGGREMENT__DATE,
    TRUNC(D.LAST_UPDATE_DATE) AGREMENT_LAST_UPDATE_DATE,
  SEGMENT1 PROJECT_NUMBER,
  c.project_type,
--  NAME PROJECT_NAME,
   LONG_NAME PROJECT_LONG_NAME,
       --TASK_NUMBER,
      ALLOCATED_AMOUNT,
      TRUNC(A.CREATION_DATE) funding_creation_date,
      TRUNC(A.LAST_UPDATE_DATE) funding_last_update_date,
      a.FUNDING_CURRENCY_CODE,
      a.PROJECT_CURRENCY_CODE,
      a.PROJFUNC_CURRENCY_CODE,
      a.PROJFUNC_ALLOCATED_AMOUNT,
       submit_baseline_flag
FROM pa_project_fundings A,
--pa_tasks b,
pa_projects_all c, pa_agreements_all d,
pa_project_customers_v ppc,
pa_project_contacts_v  ppct
WHERE a.project_id = c.project_id
AND a.agreement_id = d.agreement_id
and ppc.project_id = c.project_id
and c.project_id = ppct.project_id (+)
AND c.project_type='TMIND Contract';

No comments:

Post a Comment