pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andre Schnabel <a_schnabel@t-online.de>
To: pgsql-sql@postgresql.org
Subject: Re: nvl() function
Date: Wed, 17 Oct 2001 08:11:56 +0200
Message-ID: <9qj7fj$30ii$1@news.tht.net> (raw)
References: <9qj13u$2v5l$1@news.tht.net>

Hi Steven,


you may use COALESCE. This function should have the same behaviour as
Oracle's nvl. For documentation look at
http://www.postgresql.org/idocs/index.php?functions-conditional.html

Andre


"Steven Dahlin" <sdahlin_plsql@hotmail.com> schrieb im Newsbeitrag
news:9qj13u$2v5l$1@news.tht.net...
> I am trying to find the equivalent in Postgresql to the Oracle sql
function
> nvl().  With nvl() you give two parameters.  The first may be a
field/column
> or variable.  If the value is not null then it is returned by the
function.
> For example the with query below if the :ClientParameter is passed then
only
> those rows which have a clientdesc matching the parameter are returned.
If
> the :ClientParameter is null then those rows which have clientdesc =
> clientdesc are returned (all rows):
>
> select        clientid,
>                  clientdesc
>  from         clients
>  where       ( clientdesc     = nvl( :ClientParameter, clientdesc ) )
>
> I have looked thru all the documentation I could find but nowhere were any
> built-in SQL functions delineated.  Does anyone know where the
documentation
> can be found?
>
> Thanks,
> Steve
>
>





view thread (3+ messages)  latest in thread

Message-ID: <9qj7fj$30ii$1@news.tht.net>
Permalink:  ../9qj7fj$30ii$1@news.tht.net/
Also on:    postgresql.org/message-id/9qj7fj$30ii$1@news.tht.net

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: a_schnabel@t-online.de
  Subject: Re: nvl() function
  In-Reply-To: <9qj7fj$30ii$1@news.tht.net>

* 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