pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Al Lewis <alewis@inmedius.com>
To: pgsql-sql@postgresql.org
Subject: Null comparison
Date: Wed, 13 Dec 2000 12:23:46 -0600
Message-ID: <000b01c06531$d5815640$0b59590a@ZIPPY> (raw)

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.




view thread (3+ messages)  latest in thread

Message-ID: <000b01c06531$d5815640$0b59590a@ZIPPY>
Permalink:  ../000b01c06531$d5815640$0b59590a@ZIPPY/
Also on:    postgresql.org/message-id/000b01c06531$d5815640$0b59590a@ZIPPY

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: alewis@inmedius.com
  Subject: Re: Null comparison
  In-Reply-To: <000b01c06531$d5815640$0b59590a@ZIPPY>
  References: <000b01c06531$d5815640$0b59590a@ZIPPY>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox