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!

function to_date

user618333Feb 4 2008 — edited Feb 5 2008
i have a field SDLSTRTDT with type VARCHAR2(8).The content of SDLSTRTDT is like this: 20071224
Now I would like to run the following select:
select * from tbtco where to_date(sdlstrtdt, 'YYYYMMDD') < '01-NOV-07' order by to_date(sdlstrtdt, 'YYYYMMDD');

ERROR at line 1:
ORA-01841: (full) year must be between -4713 and +9999, and not be 0

How can i use the to_date function correct. Thank you, Lutz
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2008
Added on Feb 4 2008
12 comments
1,249 views