DBA Data[Home] [Help]

APPS.AP_MATCH_UTILITIES_PUB SQL Statements

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

Line: 67

      /* Added the Hold Exists for bug#7203269 in the Select Query*/
      l_sql_stmt := 'SELECT  count(*)
	   	      FROM po_headers			ph,
			   po_distributions		pd,
			   po_releases			pr,
			   ap_invoice_distributions	aid,
			   ap_invoices			ai
	   	     WHERE ph.po_header_id        = :b_po_header_id
		       AND ph.po_header_id        = pd.po_header_id
		       AND pd.po_release_id	  = pr.po_release_id(+)
		       AND pd.po_distribution_id  = aid.po_distribution_id
		       AND aid.invoice_id	  = ai.invoice_id
		       AND ( exists (select ''hold''
                                     from ap_holds_all ah
                                     where ai.invoice_id = ah.invoice_id
                                     AND ah.release_lookup_code is null)
                             OR   exists (select ''unvalidated dist''
                                          from ap_invoice_distributions_all aid2
                                          where ai.invoice_id = aid2.invoice_id
                                          and   nvl(aid2.match_status_flag, ''N'') <> ''A'')) ';