X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id ED5F65642C for ; Tue, 15 Mar 2005 09:52:52 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 73010-04 for ; Tue, 15 Mar 2005 09:52:44 +0000 (GMT) Received: from anchor-post-35.mail.demon.net (anchor-post-35.mail.demon.net [194.217.242.85]) by svr1.postgresql.org (Postfix) with ESMTP id 42A94563AA for ; Tue, 15 Mar 2005 09:52:43 +0000 (GMT) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-35.mail.demon.net with esmtp (Exim 4.42) id 1DB8h3-0006h3-HI; Tue, 15 Mar 2005 09:50:29 +0000 Received: from [192.168.1.17] (client17.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id 20EB015A56; Tue, 15 Mar 2005 09:52:43 +0000 (GMT) Message-ID: <4236B06C.3050601@archonet.com> Date: Tue, 15 Mar 2005 09:52:44 +0000 From: Richard Huxton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: U K Laxmi Cc: pgsql-sql@postgresql.org Subject: Re: comparing 2 tables References: <20050315093616.81023.qmail@web20023.mail.yahoo.com> In-Reply-To: <20050315093616.81023.qmail@web20023.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.062 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200503/215 X-Sequence-Number: 20694 U K Laxmi wrote: > I've two Ms Access tables with the same structure. This is a PostgreSQL list - you'd probably be better using a Microsoft-Access list. [snip] > Here what we should observe is, 1st row in table 1 not > present in table2. 2nd row in table1 is modified in > table2. 3rd row in table 2 is not present in table1. > So, after comparing table 1 and table2, the > differences are captured as old and new. Old referes > to table1 data and new referes to table2 data. The > rows that are equal in both table 1 and table 2 should > not be captured in table 3. > > Is itpossible to do this in Ms Access? If so, how. In general terms, with MS-Access, I'd build separate queries for each step. So you'd want a query for: 1. Reset table3 2. Insert to table3 rows in table1 and not in table2 3. Insert to table3 rows in table2 and not in table1 ...etc... HTH -- Richard Huxton Archonet Ltd