0 Replies Latest reply: Nov 30, 2015 6:38 PM by Harold Acosta RSS

    I need to compare two fields in the same table.. Help

      How can I nested select in the where to compare two fields from the same table? Something like the following code.

      Thanks

       

       

      select TRANSACTION_ID

      from transactions

      where ORGANIZATION_ID = 18

      and CREATION_DATE between to_date('15-Oct-2015', 'DD-MON-YYYY') and to_date('15-Nov-2015', 'DD-MON-YYYY')

      and TRANSACTION_TYPE = 'RECEIVE'

      and TRANSACTION_ID not in (select PARENT_TRANSACTION_ID from transactions)

      order by SHIPMENT_HEADER_ID