SQL Language (MOSC)

MOSC Banner

a different TO_DATE behavior in 19c

edited Dec 24, 2019 8:43AM in SQL Language (MOSC) 10 comments

Hello community.

Last month we upgraded oracle 12.2.0.1 to 19.2.0.0 on ExadataX7,

and found that a check condition of implicit format conversions of to_date has been somehow changed.

Please take a look at this.

*12.2.0.1

SQL> select TO_DATE('20190520','YYMMDD') from dual;

TO_DATE('20190520

-----------------

20190520 00:00:00

*19.2.0.0

SQL> select TO_DATE('20190520','YYMMDD') from dual;

select TO_DATE('20190520','YYMMDD') from dual

               *

ERROR at line 1:

ORA-01843: not a valid month

I know that the code is not the way it should be, but this behavior is written in SQL reference manual as follows.

https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/Format-Models.html#GUID-5B755E80-3CB2-4901-BBCF-F0FC764E0BB5

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center