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!

ORA-01840: input value not long enough for date format

2944412Oct 12 2015 — edited Oct 16 2015

Hi,

I am trying to append a bind variable (:Year) and I am getting the error as "ORA-01840: input value not long enough for date format".

The sql is

Select 

SUM(CASE WHEN  (date_start<= to_date('01/01/'||:Year,'MM/DD/YYYY') and (actual_termination_date is null or  actual_termination_date > to_date('01/01/'||:Year,'MM/DD/YYYY'))) THEN 1 ELSE 0 END ) AS CJAN

from PER_PERIODS_OF_SERVICE ppp

I have tried using to_char but of no use.


Can you please let me know what is causing the issue ???

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2015
Added on Oct 12 2015
6 comments
2,600 views