Re: How to compare dates from two tables with blanks values

From: Mike Martin <redtux1(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: How to compare dates from two tables with blanks values
Date: 2018-12-21 13:48:19
Message-ID: CAOwYNKb0C_8QmcjhmpP+LOWWo9j_dM6OQebEOk9_xR6a7an1FQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

thanks for this. I did get it to work using coalesce and nullif on opposite
sides of the where condition, but the IS DISTINCT FROM certainly sounds a
better approach. Coming from SQLServer until last year , never came across
it before

Mike

On Wed, 19 Dec 2018 at 10:57, Arnaud L. <arnaud(dot)listes(at)codata(dot)eu> wrote:

> 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
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Kumar, Virendra 2018-12-21 15:11:40 RE: Multiple LDAP Servers for ldap Authentication
Previous Message Rijo Roy 2018-12-21 12:00:07 Re: Wals not recycling