Home » SQL & PL/SQL » SQL & PL/SQL » null
null [message #37960] Fri, 08 March 2002 15:41 Go to next message
Raj
Messages: 411
Registered: November 1998
Senior Member
Hi
i have date field which is nullable
i want to know
how to select sysdate if the field iam selecting is null.

Thanks
Raj
Re: null [message #37961 is a reply to message #37960] Fri, 08 March 2002 15:55 Go to previous message
raji
Messages: 30
Registered: February 2002
Member
you can use
select nvl(datefieldname,sysdate) from table name;
This gives sysdate whenever the value of datefieldname is null.
Previous Topic: varying elements in IN list
Next Topic: How can I compare a string with 2 digits?
Goto Forum:
  


Current Time: Tue Oct 19 20:18:37 CDT 2021