Thursday, February 2, 2017

s

SELECT
  l.CUSTOMER_PO_NUMBER
l.GLOBAL_ATTRIBUTE2
FROM
  oe_headers_iface_all h,
  oe_lines_iface_all l
WHERE
  h.CUSTOMER_PO_NUMBER   =l.CUSTOMER_PO_NUMBER
AND h.sold_to_org_id     ='1296' --Customer_id of customer
AND l.GLOBAL_ATTRIBUTE2 IN('0078742087306','0078742088341') ;
 --+++++++++++++++++++++++++++++++

--For delete lines

DELETE
FROM
  oe_lines_iface_all
WHERE
  CUSTOMER_PO_NUMBER IN
  (
    SELECT
      l.CUSTOMER_PO_NUMBER
    FROM
      oe_headers_iface_all h,
      oe_lines_iface_all l
    WHERE
      h.CUSTOMER_PO_NUMBER =l.CUSTOMER_PO_NUMBER
    AND h.sold_to_org_id   ='1296'
  )
AND GLOBAL_ATTRIBUTE2 IN('0078742087306','0078742088341') ;  --place locations which are deleted.

No comments:

Post a Comment

Oracle Fusion - Cost Lines and Expenditure Item link in Projects

SELECT   ccd.transaction_id,ex.expenditure_item_id,cacat.serial_number FROM fusion.CST_INV_TRANSACTIONS cit,   fusion.cst_cost_distribution_...