|
最初由 Jiessie 发布
[B]Pls run below SQL if you want to what you wish to get :
select party.party_name Customer,
t.location bill_to_location,
ool.cust_po_number cust_PO,
h.order_number order_num,
ool.ordered_item item,
msi.description item_des,
TO_DATE(ool.request_date) cust_need_date,
ool.ordered_quantity order_QTY
from oe_order_lines ool,
oe_order_headers h,
mtl_system_items_b msi,
hz_parties party,
hz_cust_accounts hca,
hz_cust_site_uses_all t
where msi.inventory_item_id=ool.inventory_item_id
and ool.header_id=h.header_id
and hca.cust_account_id=h.sold_to_org_id
and h.invoice_to_org_id=t.site_use_id
and hca.party_id(+)=party.party_id
I hope this is helpful for you , Good luck ! [/B]
JIESSIE:你的oe_order_lines ool,
oe_order_headers h,这两个是视图。我不明白为什么从视图查不到而从表查可以查到记录。 |
|