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.

574503Apr 25 2007 — edited Apr 25 2007
DECLARE

l_start_date date := to_date ('01-JAN-2006','dd-mon-yyyy');
l_end_date date := to_date ('31-DEC-2006','dd-mon-yyyy');

BEGIN



INSERT INTO bill.BC_POS_TEMP
(SELECT DISTINCT PO_NUMBER_KEY, po_version, trunc(ordered_date), entity
FROM blanket_multiyear_po
where po_status != 'Canceled'
and trunc(ordered_date) >= trunc(l_start_date)
and trunc(ordered_date) <= trunc(l_end_date)
group by po_number_key, po_version, trunc(ordered_date), entity);

is returning a ORA-10840 error. Both blanket_multiyear_po.ordered_date and bc_pos_temp.ordered_date are generic date fields. I've also tried the above without the trunc, and there are no null ordered dates are returned by the query if I remove the date parameters. Any suggestions?

Message was edited by:
user571500
edited to remove proj. references
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 23 2007
Added on Apr 25 2007
4 comments
6,144 views