Monday, 31 October 2011

R12_Suppliers

/* Formatted on 05-09-2011 12:14:30 (QP5 v5.115.810.9015) */
  SELECT   hou.organization_id,
           hou.name Operating_Unit,
           --POV.ATTRIBUTE5 R11i_Vendor_id,
           TO_NUMBER (pov.segment1) Vendor_Code,
           pov.vendor_name Vendor,
           pov.VENDOR_TYPE_LOOKUP_CODE Vendor_Type,
           --pvs.VENDOR_SITE_ID R11i_vendor_site_id,
           pvs.VENDOR_SITE_CODE,
           (SELECT   CONCATENATED_SEGMENTS
              FROM   gl_code_combinations_kfv
             WHERE   CODE_COMBINATION_ID = pvs.PREPAY_CODE_COMBINATION_ID)
              Prepay,
           (SELECT   CONCATENATED_SEGMENTS
              FROM   gl_code_combinations_kfv
             WHERE   CODE_COMBINATION_ID = pvs.ACCTS_PAY_CODE_COMBINATION_ID)
              Liability
    FROM   po_vendors pov, po_vendor_sites_all pvs, hr_operating_units hou
   WHERE   pov.vendor_id = pvs.vendor_id AND pvs.org_id = hou.organization_id
ORDER BY   hou.organization_id, TO_NUMBER (pov.segment1)
--Select * from po_vendors where segment1='1802'

   NEW
----------
/* Formatted on 9/26/2011 5:55:22 PM (QP5 v5.115.810.9015) */
  SELECT   hou.organization_id,
           hou.name Operating_Unit,
           --POV.ATTRIBUTE5 R11i_Vendor_id,
           TO_NUMBER (pov.segment1) Vendor_Code,
           pov.vendor_name Vendor,
           pvs.ADDRESS_LINE1,
           pvs.ADDRESS_LINE2,
           pvs.ADDRESS_LINE3,
           pvs.ADDRESS_LINE4,
           pov.VENDOR_TYPE_LOOKUP_CODE Vendor_Type,
           --pvs.VENDOR_SITE_ID R11i_vendor_site_id,
           pvs.VENDOR_SITE_CODE,
           (SELECT   CONCATENATED_SEGMENTS
              FROM   gl_code_combinations_kfv
             WHERE   CODE_COMBINATI2ON_ID = pvs.PREPAY_CODE_COMBINATION_ID)
              Prepay,
           (SELECT   CONCATENATED_SEGMENTS
              FROM   gl_code_combinations_kfv
             WHERE   CODE_COMBINATION_ID = pvs.ACCTS_PAY_CODE_COMBINATION_ID)
              Liability
    FROM   po_vendors pov, po_vendor_sites_all pvs, hr_operating_units hou
   WHERE   pov.vendor_id = pvs.vendor_id AND pvs.org_id = hou.organization_id
ORDER BY   hou.organization_id, TO_NUMBER (pov.segment1)

    NEW
------------
SELECT   hou.organization_id,
           hou.name Operating_Unit,
           --POV.ATTRIBUTE5 R11i_Vendor_id,
           TO_NUMBER (pov.segment1) Vendor_Code,
           pov.vendor_name Vendor,
           pvs.ADDRESS_LINE1,
           pvs.ADDRESS_LINE2,
           pvs.ADDRESS_LINE3,
           pvs.ADDRESS_LINE4,
           PVS.ADDRESS_LINES_ALT,
           PVS.CITY,
           PVS.STATE,
           pov.VENDOR_TYPE_LOOKUP_CODE Vendor_Type,
           --pvs.VENDOR_SITE_ID R11i_vendor_site_id,
           pvs.VENDOR_SITE_CODE,
           pvs.INVOICE_AMOUNT_LIMIT,
           pvs.PAY_ON_CODE,
           pvs.PAY_ON_RECEIPT_SUMMARY_CODE,
           pvs.PREPAY_CODE_COMBINATION_ID,
           (SELECT   NAME
              FROM   ap_terms
             WHERE   TERM_ID = pvs.TERMS_ID)
              TERM_NAME,
              pvs.CREATE_DEBIT_MEMO_FLAG,
              pvs.PURCHASING_SITE_FLAG,
              pvs.PAY_SITE_FLAG,
              (SELECT   CONCATENATED_SEGMENTS
              FROM   gl_code_combinations_kfv
             WHERE   CODE_COMBINATION_ID = pvs.PREPAY_CODE_COMBINATION_ID)
              Prepay,
           (SELECT   CONCATENATED_SEGMENTS
              FROM   gl_code_combinations_kfv
             WHERE   CODE_COMBINATION_ID = pvs.ACCTS_PAY_CODE_COMBINATION_ID)
              Liability
    FROM   po_vendors pov, po_vendor_sites_all pvs, hr_operating_units hou
   WHERE   pov.vendor_id = pvs.vendor_id AND pvs.org_id = hou.organization_id
ORDER BY   hou.organization_id, TO_NUMBER (pov.segment1)

No comments:

Post a Comment