Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using NVL for date

802808Mar 2 2011 — edited Mar 3 2011
I am creating a view and one of the columns is this:
(b.startdate || ' To ' || b.enddate) salesDateRange
however when I was trying to handle the null value of date, I found the following problems,

case 1
(nvl(b.startdate, 'NA') || ' To ' || b.enddate) salesDateRange

when i use nvl, I am able to create the view, but when I retrieve the data, I get this error msg.
ORA-01858: a non-numeric character was found where a numeric was expected
01858. 00000 - "a non-numeric character was found where a numeric was expected"
*Cause: The input data to be converted using a date format model was
incorrect. The input data did not contain a number where a number was
required by the format model.
*Action: Fix the input data or the date format model to make sure the
elements match in number and type. Then retry the operation.

is nvl only available for numerical value?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2011
Added on Mar 2 2011
5 comments
93,413 views