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!

Wrong date values while querying the table

user520824Jun 7 2018 — edited Jun 8 2018

Hello,

I ran into a weird issue that a date column value is showing a wrong date WHILE QUERYING.

it never had any issues before. it is showing the wrong values after we migrated to exadata.  But not all tables are showing the wrong values.

very few tables has this issue.. can someone please advise?

as_of_date column is a date data type.

SQL>  select max(as_of_date) from T_TRADE_FIX;

MAX(AS_OF

---------

52-GREGOR

SQL> select to_char(max(as_of_date), 'dd/mm/yyyy') from dialer.T_TRADE_FIX;

TO_CHAR(MA

----------

00/00/0000

2. another issue

SQL> select max(as_of_date) from dialer.T_TRADE_DATA;

ERROR:

ORA-01801: date format is too long for internal buffer

SQL> select to_char(max(as_of_date), 'mm/dd/yyyy') from T_TRADE_DATA;

TO_CHAR(MA

----------

00/00/0000

SQL*Plus: Release 11.2.0.4.0 Production on Thu Jun 7 13:19:53 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With the Partitioning, Real Application Clusters, Automatic Storage Management,                                                                                                                                                              Oracle Label Security

and Oracle Database Vault options

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 6 2018
Added on Jun 7 2018
6 comments
2,456 views