Skip site navigation (1) Skip section navigation (2)

Re[2]: [GENERAL] COALESCE() or NVL()

From: Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it>
To: Robin Thomas <rthomas(at)azstarnet(dot)com>, pgsql-general(at)postgreSQL(dot)org
Subject: Re[2]: [GENERAL] COALESCE() or NVL()
Date: 1998-07-08 13:35:06
Message-ID: 1649.980708@bo.nettuno.it (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
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(at)azstarnet(dot)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(at)bo(dot)nettuno(dot)it



In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 1998-07-08 13:56:17
Subject: Re: [HACKERS] Trouble in paradise: cancel via postmaster ain't so cool
Previous:From: Herouth MaozDate: 1998-07-08 12:27:15
Subject: Re: [GENERAL] translate "bug"?

pgsql-general by date

Next:From: Farzad FARIDDate: 1998-07-08 14:09:46
Subject: How to rename a database?
Previous:From: Bruce TongDate: 1998-07-08 13:08:02
Subject: Re: [GENERAL] date and C

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group