Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: substitute null values in SQL query?
<wykoff_at_my-deja.com> wrote in message news:7lbn11$vge$1_at_nnrp1.deja.com...
>Once again I need equivalent SQL behavior to an SQL Server query in
>ORACLE.
>
>The value in the select is the difference in dates unless the difference
>returns NULL. In this case it returns 0 (via IsNULL()). I'm looking
>through the SQL Language reference, but I'm not coming up with anything.
Use function NVL(expr,0)
If expr (first parameter) IS NULL then
function returns 0 (second parameter) If expr (first parameter) IS NOT NULL then
function returns expr (first parameter)
Valery Yourinsky
---
Softservice, Moscow
ORACLE PARTNER
tel/fax (095) 333-63-10, 128-18-21
http://www.softexpress.ru
ICQ# 368 97 94
second E-mail: vsur_at_usa.net
Received on Wed Jun 30 1999 - 10:02:37 CDT
![]() |
![]() |