pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arnaud L. <arnaud.listes@codata.eu>
To: pgsql-general@lists.postgresql.org
Subject: Re: How to compare dates from two tables with blanks values
Date: Wed, 19 Dec 2018 11:57:38 +0100
Message-ID: <90466dc3-66f2-7db4-b716-6a5d344a1b49@codata.eu> (raw)
In-Reply-To: <CAOwYNKZqi9L4mT3B1FEAQEoT47NLuGJtyR5ZB58nFFDBseUpLQ@mail.gmail.com>
References: <CAOwYNKZqi9L4mT3B1FEAQEoT47NLuGJtyR5ZB58nFFDBseUpLQ@mail.gmail.com>

Le 19/12/2018 à 11:41, Mike Martin a écrit :
> cast(nullif(d.joineddate,NULL) as timestamp) != cast(nullif(s.joineddate,'') as timestamp) 
Try with
d.joineddate IS DISTINCT FROM s.joineddate

https://www.postgresql.org/docs/current/functions-comparison.html

Cheers
--
Arnaud




view thread (3+ messages)  latest in thread

Message-ID: <90466dc3-66f2-7db4-b716-6a5d344a1b49@codata.eu>
Permalink:  ../90466dc3-66f2-7db4-b716-6a5d344a1b49@codata.eu/
Also on:    postgresql.org/message-id/90466dc3-66f2-7db4-b716-6a5d344a1b49@codata.eu

 · 

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-general@postgresql.org
  Cc: arnaud.listes@codata.eu
  Subject: Re: How to compare dates from two tables with blanks values
  In-Reply-To: <90466dc3-66f2-7db4-b716-6a5d344a1b49@codata.eu>
  References: <CAOwYNKZqi9L4mT3B1FEAQEoT47NLuGJtyR5ZB58nFFDBseUpLQ@mail.gmail.com> <90466dc3-66f2-7db4-b716-6a5d344a1b49@codata.eu>

* 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