Re: [GENERAL] COALESCE() or NVL() - Mailing list pgsql-general

From Summer
Subject Re: [GENERAL] COALESCE() or NVL()
Date
Msg-id Pine.SGI.3.96.980716151253.19661C-100000@waimea.cs.unm.edu
Whole thread Raw
In response to Re: [GENERAL] COALESCE() or NVL()  (Robin Thomas <rthomas@azstarnet.com>)
Responses Re: [GENERAL] COALESCE() or NVL()  (Stephen Davies <scldad@sdc.com.au>)
List pgsql-general
I am trying to use the nvl function with no success
when I say:
 select bar, NVL(foo, 0) from nulltest;
I get the error:
ERROR:  function nvl(int4, int4) does not exist

Does anyone have any suggestions?
Summer


On Thu, 18 Jun 1998, Robin Thomas wrote:

> At 12:03 PM 6/17/98 +0000, Jose' Soares Da Silva wrote:
> >> Jose' Soares Da Silva writes:
> >>  > SELECT name,NVL(salary)+100 AS dream FROM emp;
> >>  > name       |dream
> >>  > -----------+-----
> >>  > Sam        | 1300
> >>  > Claire     | 5100
> >>  > Bill       | 4300
> >>  > Ginger     | 4900
> >>  > NULL VALUES|              <--- I expected 100 here.
> >>  > (5 rows)
>
> SELECT name, NVL(salary, 0) + 100 AS dream FROM emp;
>
> NVL() takes two values: the column/variable, and the value to use if NULL.
>
> --
> Robin Thomas
> rthomas@azstarnet.com
>
>


pgsql-general by date:

Previous
From: "Gene Selkov, Jr."
Date:
Subject: Re: [GENERAL] listing all tables
Next
From: James Olin Oden
Date:
Subject: Re: [GENERAL] Autonumbering column