You are on page 1of 1

SELECT hl_ship.address1 ship_loc_1, hl_ship.

address2 ship_loc_2,
hl_ship.address3 ship_loc_3, hcs_ship.LOCATION ship_to_location,
wnd.delivery_id, wdi.sequence_number packing_slip
FROM apps.oe_order_headers_all ooh,
apps.oe_order_lines_all oola,
apps.hz_cust_site_uses_all hcs_ship,
apps.hz_cust_acct_sites_all hca_ship,
apps.hz_party_sites hps_ship,
apps.hz_parties hp_ship,
apps.hz_locations hl_ship,
apps.wsh_delivery_details wdd,
apps.wsh_delivery_assignments wda,
apps.wsh_new_deliveries wnd,
apps.wsh_document_instances wdi
WHERE order_number = '101368920'
AND wdd.delivery_detail_id = wda.delivery_detail_id
AND wnd.delivery_id = wda.delivery_id
AND wdd.source_header_id = ooh.header_id
AND wdi.entity_id = wnd.delivery_id
AND ooh.header_id = oola.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
GROUP BY hl_ship.address1,
hl_ship.address2,
hl_ship.address3,
hcs_ship.LOCATION,
wnd.delivery_id,
wdi.sequence_number

You might also like