Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eBDMk2X53261 for ; Wed, 13 Dec 2000 17:46:02 -0500 (EST) (envelope-from pgsql-sql-owner@postgresql.org) Received: from omahpop4.omah.uswest.net (omahpop4.omah.uswest.net [204.26.64.4]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eBDINHj09696 for ; Wed, 13 Dec 2000 13:23:18 -0500 (EST) (envelope-from alewis@inmedius.com) Received: (qmail 5091 invoked by alias); 13 Dec 2000 18:23:41 -0000 Received: (qmail 5079 invoked by uid 0); 13 Dec 2000 18:23:41 -0000 Received: from dialupk185.omah.uswest.net (HELO ZIPPY) (216.161.77.185) by omahpop4.omah.uswest.net with SMTP; 13 Dec 2000 18:23:40 -0000 Reply-To: From: "Al Lewis" To: Subject: Null comparison Date: Wed, 13 Dec 2000 12:23:46 -0600 Message-ID: <000b01c06531$d5815640$0b59590a@ZIPPY> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Importance: Normal Disposition-Notification-To: "Al Lewis" X-Archive-Number: 200012/117 X-Sequence-Number: 451 I am migrating to postgress from msql and am encountering numerous problems in the differences in NULL usage and comparison. 1. Why are 2 fields not equal if they are both NULL? 2. Is there a way to easily modify my sql select statements to account for either column being NULL and having them return true if they both are NULL? select a.name, b.cost from a, b where a.type=b.type I'd like to make this as easy as possible so I can put it into a "translation" function. Currently I have a regsub that handles <> and NULLs, since <> doesn't work on a NULL field. thanks, Al pls cc me on your response.