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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-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

Browse pgsql-general by date

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

Browse pgsql-hackers by date

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