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




