I have 2 tables that are identical. These tables are being replicated and should contain the same number of records and data etc. From time to time, for whatever reason, these tables get out of "sync".
Now, I need to compare compare records in the 2 tables. I have sql code that looks at both tables. The problem is that the output lists all the records.
At this point I am only interested in printing record(s) that exist in one table but not in the other. Can someone help?
Table 1, ODBC for RGWP Remote Server
SELECT "SALESTKT"."TICKET_ID", "SALESTKT"."TICKET_DATE", "SALESTKT"."TICKET_TIME" FROM "SALESTKT" "SALESTKT" EXTERNAL JOIN SALESTKT.TICKET_ID={?Advantage ODBC for RGWP: SALESTKT_1.TICKET_ID}
Table 2, ODBC for RGWP Local Server
SELECT "SALESTKT_1"."TICKET_ID", "SALESTKT_1"."TICKET_DATE", "SALESTKT_1"."TICKET_TIME" FROM "SALESTKT" "SALESTKT_1"
WHERE "SALESTKT_1"."TICKET_ID"={?Advantage ODBC for RGWP Remote: SALESTKT.TICKET_ID}
Now, I need to compare compare records in the 2 tables. I have sql code that looks at both tables. The problem is that the output lists all the records.
At this point I am only interested in printing record(s) that exist in one table but not in the other. Can someone help?
Table 1, ODBC for RGWP Remote Server
SELECT "SALESTKT"."TICKET_ID", "SALESTKT"."TICKET_DATE", "SALESTKT"."TICKET_TIME" FROM "SALESTKT" "SALESTKT" EXTERNAL JOIN SALESTKT.TICKET_ID={?Advantage ODBC for RGWP: SALESTKT_1.TICKET_ID}
Table 2, ODBC for RGWP Local Server
SELECT "SALESTKT_1"."TICKET_ID", "SALESTKT_1"."TICKET_DATE", "SALESTKT_1"."TICKET_TIME" FROM "SALESTKT" "SALESTKT_1"
WHERE "SALESTKT_1"."TICKET_ID"={?Advantage ODBC for RGWP Remote: SALESTKT.TICKET_ID}