Re: nvl() function

From: "Andre Schnabel" <a_schnabel(at)t-online(dot)de>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: nvl() function
Date: 2001-10-17 06:11:56
Message-ID: 9qj7fj$30ii$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)hotmail(dot)com> schrieb im Newsbeitrag
news:9qj13u$2v5l$1(at)news(dot)tht(dot)net(dot)(dot)(dot)
> 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
>
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kusuma 2001-10-17 06:48:24 Re: Performance problems - Indexes and VACUUM
Previous Message Tom Lane 2001-10-17 03:56:44 Re: Restricting access to Large objects