Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006

    Unanswered: Find missing records in two tables

    Hi all,
    I have two similar tables CUST and CUST_TEMP, and they are both supposed to have the same data and when I am looking at the counts CUST_TEMP if off by 100+ records.
    The primary key is CUST_ID (INT (4)) and ASSET ( CHAR(80)) .
    Is there a way to find the missing records in CUST_TEMP table?

    Thanks in advance..

  2. #2
    Join Date
    Jun 2006
    select * from cust a where not exists
    (select t.CUST_ID ,t.ASSET
    from cust_temp t
    t.CUST_ID=a.cust_id and
    t.ASSET =a.asset)
    Best Regards, Guy Przytula
    DB2 UDB LUW certified V6/7/8

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts