Converting a textual day of month using TO_DATE, ORA-01858
- From: Jack <jreid@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Apr 2008 13:11:12 -0700 (PDT)
I am trying to solve the problem of converting a day of the month
provided as a character value ('One') into an Oracle date value:
SQL> create table t1 (
2 my_date DATE
3 );
Table created.
1 INSERT INTO t1
2* VALUES (TO_DATE('June One, 2000', 'Month Ddsp, yyyy'))
SQL> /
VALUES (TO_DATE('June One, 2000', 'Month Ddsp, yyyy'))
*
ERROR at line 2:
ORA-01858: a non-numeric character was found where a numeric was
expected
It looks to me like like this is due to not having a 'direct' format
model for a character value for a day of the month. Month values have
the "month" format model to help with this, but I can't find anything
corresponding for the day of the month.
Oracle 10.2.0.1.0
Thank you for any suggestions.
Jack
.
- Prev by Date: Re: Can XA (failover/recovery) work with DataGuard?
- Next by Date: moving tables from system tablespace
- Previous by thread: http://www.phenoelit.net/lablog/oracle.sl wrote
- Next by thread: moving tables from system tablespace
- Index(es):
Relevant Pages
|