PO_HEADERS_ALL
SELECT
PHA.PO_HEADER_ID,
PHA.SEGMENT1 "PO NUM",
PHA.TYPE_LOOKUP_CODE "TYPE",
TO_CHAR(PHA.CREATION_DATE,'DD/MON/YY') "PO DATE",
PV.VENDOR_NAME "SUPPLIER NAME",
PVSA.VENDOR_SITE_CODE "SUPPLIER SITE",
PVC.FIRST_NAME "SUPPLIER CONTACT",
HLA1.LOCATION_CODE "SHIP TO LOCATION",
HLA2.LOCATION_CODE "BILL TO LOCATION",
PAPF.FULL_NAME "BUYER",
PHA.AUTHORIZATION_STATUS "STATUS",
PHA.COMMENTS "DESCRIPTION"
FROM
PO_HEADERS_ALL PHA,
PO_VENDORS PV,
PO_VENDOR_SITES_ALL PVSA,
PO_VENDOR_CONTACTS PVC,
HR_LOCATIONS HLA1,
HR_LOCATIONS HLA2,
PER_ALL_PEOPLE_F PAPF
WHERE
PHA.SEGMENT1 = 4420 AND
PHA.VENDOR_ID = PV.VENDOR_ID AND
PHA.VENDOR_SITE_ID = PVSA.VENDOR_SITE_ID AND
PHA.VENDOR_CONTACT_ID = PVC.VENDOR_CONTACT_ID AND
PHA.SHIP_TO_LOCATION_ID = HLA1.LOCATION_ID AND
PHA.BILL_TO_LOCATION_ID = HLA2.LOCATION_ID AND
PHA.AGENT_ID = PAPF.PERSON_ID
SELECT
PHA.PO_HEADER_ID,
PHA.SEGMENT1 "PO NUM",
PHA.TYPE_LOOKUP_CODE "TYPE",
TO_CHAR(PHA.CREATION_DATE,'DD/MON/YY') "PO DATE",
PV.VENDOR_NAME "SUPPLIER NAME",
PVSA.VENDOR_SITE_CODE "SUPPLIER SITE",
PVC.FIRST_NAME "SUPPLIER CONTACT",
HLA1.LOCATION_CODE "SHIP TO LOCATION",
HLA2.LOCATION_CODE "BILL TO LOCATION",
PAPF.FULL_NAME "BUYER",
PHA.AUTHORIZATION_STATUS "STATUS",
PHA.COMMENTS "DESCRIPTION"
FROM
PO_HEADERS_ALL PHA,
PO_VENDORS PV,
PO_VENDOR_SITES_ALL PVSA,
PO_VENDOR_CONTACTS PVC,
HR_LOCATIONS HLA1,
HR_LOCATIONS HLA2,
PER_ALL_PEOPLE_F PAPF
WHERE
PHA.SEGMENT1 = 4420 AND
PHA.VENDOR_ID = PV.VENDOR_ID AND
PHA.VENDOR_SITE_ID = PVSA.VENDOR_SITE_ID AND
PHA.VENDOR_CONTACT_ID = PVC.VENDOR_CONTACT_ID AND
PHA.SHIP_TO_LOCATION_ID = HLA1.LOCATION_ID AND
PHA.BILL_TO_LOCATION_ID = HLA2.LOCATION_ID AND
PHA.AGENT_ID = PAPF.PERSON_ID
No comments:
Post a Comment