Wednesday, 12 June 2013

project without po and invoice information

SELECT  *
  FROM   pa_projects_all a,pa_project_statuses b
 WHERE 1 = 1
 and a.project_status_code = b.project_status_code 
 and  a.creation_date between :aa and :bb
 and  b.project_system_status_code = ('APPROVED')
 and project_id NOT IN
               (SELECT   pod.project_id
                  FROM   po_distributions_all pod,
                         ap_invoice_DIstributions_All apd
                 WHERE   pod.PO_DISTRIBUTION_ID = apd.PO_DISTRIBUTION_ID
                         AND pod.PROJECT_ID IS not NULL
                         and apd.org_id = 839)

No comments:

Post a Comment