Received: from caladan.highertech.net (root@uucp.highertech.net [209.140.48.10]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA05904 for ; Fri, 24 Sep 1999 09:25:23 -0400 (EDT) (envelope-from jt-kirkpatrick@mpsllc.com) Received: from kirkpatrickjt (whiteoak-34.highertech.net [209.140.56.34] (may be forged)) by caladan.highertech.net (8.8.6/8.8.6) with SMTP id JAA09083 for ; Fri, 24 Sep 1999 09:02:04 -0400 Received: by localhost with Microsoft MAPI; Fri, 24 Sep 1999 09:22:51 -0400 Message-ID: <01BF066E.5FDF4460.jt-kirkpatrick@mpsllc.com> From: JT Kirkpatrick To: "'pgsql-sql@hub.org'" Subject: comparing 2 tables. . . Date: Fri, 24 Sep 1999 09:22:50 -0400 Organization: MPS, LLC X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit can anyone help please?? we have two tables in our database that *should* have the exact same number of records, with identical values in their corresponding primary keys (pk same in both tables, int4). for this example, table t1 with primary key pk, and table t2 with primary key pk. after about 3 months of use and a crash last night i see that the two tables do NOT have the same number of records -- one is missing some that it should have. is there a way i can compare the two tables and select ONLY the records that do NOT exist in the 2nd table?? if i could identify the records (and the pk) then i could manually insert them. each table has over 50,000 records so it is not feasable to review each record to find them manually (which i tried last night. . .). we are struggling this morning -- any help you could provide quickly would be greatly appreciated! jt kirkpatrick / mps