This script can be used to extract order header details from backend.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
SELECT ra.customer_number, hl.address1, hl.address2, hl.city, hl.state, hl.postal_code, hl.country, hl.province, hl.county FROM oe_order_headers_all ooh, hz_cust_site_uses_all hcsu, hz_cust_acct_sites_all hcas, hz_party_sites hps, hz_locations hl, ra_customers ra WHERE 1 = 1 AND ooh.invoice_to_org_id = hcsu.site_use_id AND hcsu.cust_acct_site_id = hcas.cust_acct_site_id AND hcas.party_site_id = hps.party_site_id AND hps.location_id = hl.location_id AND hcas.cust_account_id = ra.customer_id AND order_number = &Order_number |