I am trying to see the PO number for parts on a Distro Order, i have the below SQL but it is retuning both closed and open PO’s is there a way for it to only show the open PO’s. Thank you
(SELECT listagg(order_NO, '^') WITHIN GROUP (ORDER BY 1) FROM (SELECT ORDER_NO FROM &AO.PURCHASE_REQ_LINE_ALL WHERE part_no = DISTRIBUTION_ORDER.PART_NO))