0 Replies Latest reply: Jul 5, 2012 4:55 AM by 733880 RSS

    Fetch Master Records - Doesnt hav Child Rec

    733880
      Hello Experts,

      BANNER

      Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
      PL/SQL Release 8.1.7.4.0 - Production
      CORE     8.1.7.0.0     Production
      TNS for IBM/AIX RISC System/6000: Version 8.1.7.4.0 - Production
      NLSRTL Version 3.4.1.0.0 - Production


      Below is my table - ORG_VALUE
      ITEM_ID  ITEM_TYPE ORG_ID
      1000     TEST      222
      1000     TEST_1    223
      2000     TEST      322
      2000     TEST_1    323
      3000     TEST      222
      4000     TEST      322
      222,322- Master Org id... 223,323 - Child Org id

      I need to fetch those records which doesnt have child record for particular item in same table.

      E.g; if 1000 item_id for 222 org id, then def. there should be child record 1000 for 223 org_id.
      Similar for 322 and 323.

      OUTPUT
      ITEM_ID  ITEM_TYPE ORG_ID
      3000     TEST      222
      4000     TEST      322