SQL Purchase
The script below links pos to invoices but I cannot get the purchase order contract number even though I have requested it from the PO_LINES_ALL table. Does someone have an idea how I can get the contract number into the script. ?
SELECT A.ORG_ID "ORG ID",
E.VENDOR_NAME "VENDOR NAME",
UPPER (E.VENDOR_TYPE_LOOKUP_CODE) "VENDOR TYPE",
F.VENDOR_SITE_CODE "VENDOR SITE",
F.ADDRESS_LINE1 "ADDRESS",
F.CITY "CITY",
F.COUNTRY "COUNTRY",
TO_CHAR (TRUNC (D.CREATION_DATE)) "PO DATE",
G.CONTRACT_NUM "CONTRACT NUM",
D.SEGMENT1 "PO NUMBER",
D.TYPE_LOOKUP_CODE "PO TYPE",