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

From Sferacarta Software
Subject Re[2]: [GENERAL] COALESCE() or NVL()
Date
Msg-id 1649.980708@bo.nettuno.it
Whole thread Raw
In response to Re: [GENERAL] COALESCE() or NVL()  (Robin Thomas <rthomas@azstarnet.com>)
List pgsql-general
Hello Robin,

giovedì, 18 giugno 98, you wrote:

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

RT> SELECT name, NVL(salary, 0) + 100 AS dream FROM emp;

RT> NVL() takes two values: the column/variable, and the value to use if NULL.

RT> --
RT> Robin Thomas
RT> rthomas@azstarnet.com
I don't think this work Robin, because there isn't such function on
PostgreSQL.
the only thing that I have is:

     function nvl(int4, int4) does not exist

Do you know how to implement it on PostgreSQL ?

Best regards,
 Jose'                            mailto:sferac@bo.nettuno.it



pgsql-general by date:

Previous
From: Maarten Boekhold
Date:
Subject: Re: [GENERAL] Moving Databases
Next
From: Sferacarta Software
Date:
Subject: Re: [GENERAL] What to do with no foreign keys