ITPub博客

首页 > 数字化转型 > ERP > 导入客户信息SQL QUERY

导入客户信息SQL QUERY

原创 ERP 作者:bijiashanxia 时间:2015-02-12 11:19:51 0 删除 编辑
select hzp.party_name       party_name,
       hzp.party_type       part_type,
       hzp.status           party_status,
      /* party information*/
       hz_ca.account_number account_number,
       hz_ca.account_name acount_description,
    /* account information*/
       hz_loc.country country,
       hz_loc.province      province,
       hz_loc.address1      address,
      /* location information*/
       hou.name             organization_name,
       hz_cas.bill_to_flag  bill_to_flag,
       hz_csu.location      location_2,
       hz_cas.ship_to_flag  ship_to_flag,
      /* account site information*/
       ra_ter.name ship_to_territory,
       ra_ter.segment1 area,
       ra_ter.segment2 country,
       ra_ter.segment3 cust_region,
       /*site sales territory information*/
       hz_csu.gl_id_rec gl_rec


  from ar.hz_parties                hzp,
       ar.hz_cust_accounts          hz_ca,
       ar.hz_party_sites            hz_ps,
       ar.hz_locations              hz_loc,
       ar.hz_cust_acct_sites_all    hz_cas,
       ar.hz_cust_site_uses_all     hz_csu,
       hr.hr_all_organization_units hou,
       ar.ra_territories            ra_ter


 where hzp.party_id = hz_ca.party_id
   and hz_ps.location_id = hz_loc.location_id(+)
   and hz_ps.party_site_id = hz_cas.party_site_id
   and hz_ca.cust_account_id = hz_cas.cust_account_id
   and hz_cas.cust_acct_site_id = hz_csu.cust_acct_site_id
   and hou.organization_id = hz_cas.org_id
   and hz_csu.territory_id = ra_ter.territory_id(+)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29534067/viewspace-1434096/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-03-12

  • 博文量
    30
  • 访问量
    63905