Query to Join Delivery Details and MTL Material Table

SELECT wdd.source_header_number,
       wdd.source_line_id,
       wdd.delivery_detail_id,
       wdd.released_status,
       oe_interfaced_flag,
       inv_interfaced_flag,
       wdd.creation_date,
       mtl.transaction_id,
       l.flow_status_code,
       l.open_flag,
       l.cancelled_flag
  FROM apps.wsh_delivery_details      wdd,
       apps.mtl_material_transactions mtl,
       apps.oe_order_lines_all        l
 WHERE l.line_id = wdd.source_line_id
   AND wdd.delivery_detail_id = mtl.picking_line_id
   AND wdd.source_code = 'OE'
   AND wdd.oe_interfaced_flag = 'Y'
   --AND wdd.released_status = 'Y';

 

also below is query to join order line with MTL_MATERIAL_TRANSACTIONS

select mtl.transaction_id,l.flow_status_code,l.open_flag,l.cancelled_flag,l.shipped_quantity

from mtl_material_transactions mtl,oe_order_lines_all l where mtl.trx_source_line_id = l.line_id

 

posted @ 2012-02-28 16:19  郭振斌  阅读(1422)  评论(0编辑  收藏  举报