Saturday 2 July 2011

How to find the old quantity and new quantity in PO

  Sample Query
=================


SELECT   (pla.quantity - plal.quantity) AMMNDED_QUANTITY,
         (pla.unit_price - PLAL.unit_price) AMMENDED_PRICE
  FROM   po_lines_archive_all plal, po_lines_all pla
 WHERE       pla.po_header_id = plal.po_header_id
         AND TRUNC (pla.retroactive_date) = TRUNC (plal.last_update_date)
         AND pla.po_header_id = '534001';

No comments:

Post a Comment