?
Solved

NVL for date parameter

Posted on 2000-01-10
3
Medium Priority
?
9,798 Views
Last Modified: 2008-03-06
How is the NVL function look for a date parameter :
NVL(column_date , ??????)
Thank you
sharone
0
Comment
Question by:sharone_
3 Comments
 
LVL 3

Expert Comment

by:bkowalski
ID: 2339359
You would specify it according to how you are using the output.  If you are storing the result in a date variable, then maybe like this:
  NVL(column_date, to_date('12/31/1999', 'mm/dd/yyyy'));
or
  NVL(column_date, sysdate);
You just have to make sure if a null is encountered, the NVL function returns a date type to match the variable.
0
 
LVL 10

Expert Comment

by:paasky
ID: 2339369
Hi Sharone,

NVL(column_date,to_date('&P_DATE','DD-MON-YYYY'))

(you should use the same date mask the parameter is)

Paasky
0
 

Accepted Solution

by:
Softchoice earned 40 total points
ID: 2342334
TEST> select nvl(NULL,SYSDATE) from dual;

NVL(NULL,SY
-----------
11-JAN-2000

You just replace NULL and dual
with the appropriate column and table_name.

Your question suggests that you already know this. Are you asking for more?
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question