Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle equivalent to DB2 NULLIF function?

Re: Oracle equivalent to DB2 NULLIF function?

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: Fri, 16 Jul 1999 09:04:57 +0100
Message-ID: <Yvnk5GApeuj3Ewca@ahardy.demon.co.uk>


In article <7mm0pa$esm$1_at_news.btv.ibm.com>, Jim Morgan <jjmorgan_at_us.ibm.com> writes
>Anyone know if there is an Oracle equivalent to this DB2 function? Thanks!

What does NULLIF do?

If it's a 'return null id its this value' then perhaps DECODE would suffice? e.g. DECODE (my_column, 'shouldbenull', NULL, my_column).

If it's a 'return this value instead of a null' then try NVL e.g. NVL(my_column, 'it was a null value').

Otherwise...

Andy
--
Andy Hardy. PGP key available on request


Received on Fri Jul 16 1999 - 03:04:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US