Received: from new.zotnet.com (IDENT:root@216-99-218-133.dsl.aracnet.com [216.99.218.133]) by hub.org (8.10.1/8.10.1) with ESMTP id e6B0TmW45566 for ; Mon, 10 Jul 2000 20:29:49 -0400 (EDT) Received: from zotconsulting.com (mp.zotnet.com [216.99.218.134]) by new.zotnet.com (8.8.5/8.8.5) with ESMTP id RAA11383 for ; Mon, 10 Jul 2000 17:29:47 -0700 Message-ID: <396A6A7B.39CC7772@zotconsulting.com> Date: Mon, 10 Jul 2000 17:29:47 -0700 From: "Zot O'Connor" Organization: Zot Consulting X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.3.37smp i686) X-Accept-Language: en MIME-Version: 1.0 To: postgres sql Subject: Finding entries not in table..differnce? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200007/112 I need to write a quick function that tells me all of the entriles in table that are not in table2. The tables are copies of each other, but 1 has been updated. I know this is easy, but I am running on little sleep :) I want to due something like select prodlang.prodlsku from prodland,prodlang2 WHERE prodlang.prodlsku != prodlang2.prodlsku But of course I would get every record, several times since at some point the sku does not equal another sku. I tried !!= (NOT IN) but it did not like that at all, since sku is a char field. I am running an older version of postgress on this server, I do not know if that is important. -- Zot O'Connor http://www.ZotConsulting.com http://www.WhiteKnightHackers.com