忙裏偷閑

很多事情很多心情寫了也就記下了; 不寫,以後可能就忘了.
個人資料
正文

Query about Sales order and Customer Information

(2009-07-30 06:58:19) 下一個
 SELECT ooh.order_number ,
                hp_bill.party_name ,
                hl_ship.address1 ship_to_address ,
                hl_bill.address1 bill_to_address ,
                ooh.transactional_curr_code currency_code ,
                mp.organization_code , 
                ooh.fob_point_code ,
                ooh.freight_terms_code ,
                ooh.cust_po_number
FROM oe_order_headers_all ooh ,
             hz_cust_site_uses_all hcs_ship ,
             hz_cust_acct_sites_all hca_ship ,
             hz_party_sites hps_ship ,
             hz_parties hp_ship ,
             hz_locations hl_ship ,
             hz_cust_site_uses_all hcs_bill ,
             hz_cust_acct_sites_all hca_bill ,
             hz_party_sites hps_bill ,
             hz_parties hp_bill , 
             hz_locations hl_bill ,
             mtl_parameters mp
WHERE header_id = Your Header Id
AND ooh.ship_to_org_id = hcs_ship.site_use_id
AND hcs_ship.cust_acct_site_id = hca_ship.cust_acct_site_id
AND hca_ship.party_site_id = hps_ship.party_site_id
AND hps_ship.party_id = hp_ship.party_id
AND hps_ship.location_id = hl_ship.location_id
AND ooh.invoice_to_org_id = hcs_bill.site_use_id
AND hcs_bill.cust_acct_site_id = hca_bill.cust_acct_site_id
AND hca_bill.party_site_id = hps_bill.party_site_id
AND hps_bill.party_id = hp_bill.party_id
AND hps_bill.location_id = hl_bill.location_id
AND mp.organization_id(+) = ooh.ship_from_org_id

Reference: https://oracleerp.groupsite.com/discussion/topic/show/214461?lpx=1
[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.