Pages

Tuesday 13 September 2016

ORA-01483: invalid length for DATE or NUMBER bind variable

Question:
I’m getting an "ORA-01483: invalid length for DATE or NUMBER bind variable" error with the following code:

Answer:  

In Oracle form,change DML Return Value to No in block property.

If not worked then try the below,

The Line
where  to_char(revdate, 'dd-mon-yyyy') = '25-oct-2005'
should be
where revdate = to_date('25-OCT-2005','DD-MON-YYYY')
and the line
and  revdate < to_date('01-jan-2000')
 should be
and  revdate < to_date('01-JAN-2000','DD-MON-YYYY')

Answer: 
WHERE revdate >= to_date('25-OCT-2005','DD-MON-YYYY')
AND revdate < to_date('26-OCT-2005','DD-MON-YYYY')

Credits to:
           Thanks to Sundar anna - Senior Software developer.

No comments:

Post a Comment

Code Review

 SOLID Principles S – Single Responsibility Principle There should never be more than one reason for a class to change. O – Open-Closed Prin...