“This query is used to get the document number of purchase orders that are not in incomplete or cancelled status.

“This query is used to get the document number of purchase orders that are not in incomplete or cancelled status.

“This query is used to get the document number of purchase orders that are not in incomplete or cancelled status.

This query selects the SEGMENT1 column from the PO_HEADERS_ALL table, which typically represents the purchase order number. It filters the records to exclude purchase orders whose DOCUMENT_STATUS is ‘INCOMPLETE’ or ‘CANCELLED’. As a result, the query returns the identifiers of purchase orders that are currently active or in valid processing states. 

SQL Query Section 

SELECT 

SEGMENT1 

FROM 

PO_HEADERS_ALL 

WHERE 

document_status not in ('INCOMPLETE','CANCELLED')  

Output Results 

Leave a Reply

Your email address will not be published. Required fields are marked *