DBA Data[Home] [Help]

VIEW: APPS.OZF_RESALE_HEADERS_V

Source

View Text - Preformatted

SELECT resale_header_id, rh.date_shipped, rh.date_ordered, rh.order_type_id, ott.name, rh.order_type, rh.order_category, rh.status_code, lk_st.meaning user_status, rh.direct_customer_flag, rh.order_number, rh.price_list_id, qp.name price_list, rh.bill_to_cust_account_id, rh.bill_to_site_use_id, rh.bill_to_party_name, rh.bill_to_party_id, rh.bill_to_party_site_id, rh.bill_to_location, rh.bill_to_duns_number, rh.bill_to_address, rh.bill_to_city, rh.bill_to_state, rh.bill_to_postal_code, rh.bill_to_country, rh.bill_to_contact_party_id, rh.bill_to_contact_name, rh.bill_to_email, rh.bill_to_phone, rh.bill_to_fax, rh.ship_to_cust_account_id, rh.ship_to_site_use_id, rh.ship_to_party_name, rh.ship_to_party_id, rh.ship_to_party_site_id, rh.ship_to_location, rh.ship_to_duns_number, rh.ship_to_address, rh.ship_to_city, rh.ship_to_state, rh.ship_to_postal_code, rh.ship_to_country, rh.ship_to_contact_party_id, rh.ship_to_contact_name, rh.ship_to_email, rh.ship_to_fax, rh.ship_to_phone, rh.sold_from_cust_account_id, hp_sold.party_name sold_from_party_name, rh.ship_from_cust_account_id, hp_ship.party_name ship_from_party_name FROM ozf_resale_headers_all rh , hz_parties hp_sold , hz_cust_accounts hca_sold , hz_parties hp_ship , hz_cust_accounts hca_ship , oe_transaction_types_vl ott , ozf_lookups lk_st , qp_list_headers qp WHERE rh.sold_from_cust_account_id = hca_sold.cust_account_id AND hca_sold.party_id = hp_sold.party_id AND rh.ship_from_cust_account_id = hca_ship.cust_account_id AND hca_ship.party_id = hp_ship.party_id AND rh.order_type_id = ott.transaction_type_id (+) AND rh.status_code = lk_st.lookup_code AND lk_st.lookup_type = 'OZF_RESALE_LINE_STATUS' AND rh.price_list_id = qp.list_header_id
View Text - HTML Formatted

SELECT RESALE_HEADER_ID
, RH.DATE_SHIPPED
, RH.DATE_ORDERED
, RH.ORDER_TYPE_ID
, OTT.NAME
, RH.ORDER_TYPE
, RH.ORDER_CATEGORY
, RH.STATUS_CODE
, LK_ST.MEANING USER_STATUS
, RH.DIRECT_CUSTOMER_FLAG
, RH.ORDER_NUMBER
, RH.PRICE_LIST_ID
, QP.NAME PRICE_LIST
, RH.BILL_TO_CUST_ACCOUNT_ID
, RH.BILL_TO_SITE_USE_ID
, RH.BILL_TO_PARTY_NAME
, RH.BILL_TO_PARTY_ID
, RH.BILL_TO_PARTY_SITE_ID
, RH.BILL_TO_LOCATION
, RH.BILL_TO_DUNS_NUMBER
, RH.BILL_TO_ADDRESS
, RH.BILL_TO_CITY
, RH.BILL_TO_STATE
, RH.BILL_TO_POSTAL_CODE
, RH.BILL_TO_COUNTRY
, RH.BILL_TO_CONTACT_PARTY_ID
, RH.BILL_TO_CONTACT_NAME
, RH.BILL_TO_EMAIL
, RH.BILL_TO_PHONE
, RH.BILL_TO_FAX
, RH.SHIP_TO_CUST_ACCOUNT_ID
, RH.SHIP_TO_SITE_USE_ID
, RH.SHIP_TO_PARTY_NAME
, RH.SHIP_TO_PARTY_ID
, RH.SHIP_TO_PARTY_SITE_ID
, RH.SHIP_TO_LOCATION
, RH.SHIP_TO_DUNS_NUMBER
, RH.SHIP_TO_ADDRESS
, RH.SHIP_TO_CITY
, RH.SHIP_TO_STATE
, RH.SHIP_TO_POSTAL_CODE
, RH.SHIP_TO_COUNTRY
, RH.SHIP_TO_CONTACT_PARTY_ID
, RH.SHIP_TO_CONTACT_NAME
, RH.SHIP_TO_EMAIL
, RH.SHIP_TO_FAX
, RH.SHIP_TO_PHONE
, RH.SOLD_FROM_CUST_ACCOUNT_ID
, HP_SOLD.PARTY_NAME SOLD_FROM_PARTY_NAME
, RH.SHIP_FROM_CUST_ACCOUNT_ID
, HP_SHIP.PARTY_NAME SHIP_FROM_PARTY_NAME
FROM OZF_RESALE_HEADERS_ALL RH
, HZ_PARTIES HP_SOLD
, HZ_CUST_ACCOUNTS HCA_SOLD
, HZ_PARTIES HP_SHIP
, HZ_CUST_ACCOUNTS HCA_SHIP
, OE_TRANSACTION_TYPES_VL OTT
, OZF_LOOKUPS LK_ST
, QP_LIST_HEADERS QP
WHERE RH.SOLD_FROM_CUST_ACCOUNT_ID = HCA_SOLD.CUST_ACCOUNT_ID
AND HCA_SOLD.PARTY_ID = HP_SOLD.PARTY_ID
AND RH.SHIP_FROM_CUST_ACCOUNT_ID = HCA_SHIP.CUST_ACCOUNT_ID
AND HCA_SHIP.PARTY_ID = HP_SHIP.PARTY_ID
AND RH.ORDER_TYPE_ID = OTT.TRANSACTION_TYPE_ID (+)
AND RH.STATUS_CODE = LK_ST.LOOKUP_CODE
AND LK_ST.LOOKUP_TYPE = 'OZF_RESALE_LINE_STATUS'
AND RH.PRICE_LIST_ID = QP.LIST_HEADER_ID