Query to get the TCA(Trading Community Architecture) Tables data

Query to get the TCA(Trading Community Architecture) Tables data, www.askhareesh.com

SELECT HP.PARTY_ID,
       HP.PARTY_NUMBER,
       HP.PARTY_NAME,
       HPS.PARTY_SITE_NAME,
          HZL.ADDRESS1
       || HZL.ADDRESS2
       || HZL.ADDRESS3
       || HZL.ADDRESS4
       || HZL.COUNTRY
       || HZL.CITY
       || HZL.COUNTY
          LOCATION,
       HCAS.BILL_TO_FLAG,
       HCSU.SITE_USE_CODE,
       HCP.CONTACT_POINT_TYPE,
       HCP.OWNER_TABLE_NAME,
       HCP.STATUS,
       HCPR.OBJECT_VERSION_NUMBER
  FROM HZ_PARTIES HP,
       HZ_PARTY_SITES HPS,
       HZ_LOCATIONS HZL,
       HZ_CUST_ACCOUNTS HCA,
       HZ_CUST_ACCT_SITES_ALL HCAS,
       HZ_CUST_SITE_USES_ALL HCSU,
       HZ_CONTACT_POINTS HCP,
       HZ_CUSTOMER_PROFILES HCPR
 WHERE     HP.PARTY_NAME = 'A. C. Networks'
       AND HP.PARTY_ID = HPS.PARTY_ID
       AND HPS.LOCATION_ID = HZL.LOCATION_ID
       AND HP.PARTY_ID = HCA.PARTY_ID
       AND HCA.CUST_ACCOUNT_ID = HCAS.CUST_ACCOUNT_ID
       AND HPS.PARTY_SITE_ID = HCAS.PARTY_SITE_ID
       AND HCAS.CUST_ACCT_SITE_ID = HCSU.CUST_ACCT_SITE_ID
       AND HCSU.SITE_USE_ID = HCPR.SITE_USE_ID
       AND HCAS.CUST_ACCOUNT_ID = HCPR.CUST_ACCOUNT_ID
       AND HCAS.BILL_TO_FLAG = 'P'
       AND HP.PARTY_TYPE IN ('PERSON', 'ORGANIZATION')
       AND HCP.PHONE_LINE_TYPE = 'HOME'



*/

No comments:

Post a Comment