about nvl2 function
From: riverdance <esthershensh_at_yahoo.com>
Date: Tue, 8 Jun 2010 07:45:07 -0700 (PDT)
Message-ID: <de741180-2064-4881-b792-df48e081184b_at_h13g2000yqm.googlegroups.com>
HI,
Date: Tue, 8 Jun 2010 07:45:07 -0700 (PDT)
Message-ID: <de741180-2064-4881-b792-df48e081184b_at_h13g2000yqm.googlegroups.com>
HI,
sorry , I'm new to oracle world..
who could help explain following.. I expected following SQL would error out.. but I got following result.
I don't understand, how date format string '1/1/2010' could convert to number .000497512, and how date format string 1-1-2010 could convert to number -2010?
SQL> select nvl2(birth_dt,0,1/1/2010) from eshen.test;
NVL2(BIRTH_DT,0,1/1/2010)
.000497512
.000497512
SQL> select nvl2(birth_dt,0,1-1-2010) from eshen.test;
NVL2(BIRTH_DT,0,1-1-2010)
-2010 -2010Received on Tue Jun 08 2010 - 09:45:07 CDT