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 - 01843: not a valid month

sambitJun 9 2011 — edited Jun 9 2011
Hey Guys,

We are storing one date value (in DD-MON-RRR format) in one descriptive flex field of one seeded oracle apps table. It stores in ATTRIBUTE14 of that table, which is of type VARCHAR2. we are then using this field in our various custom PL/SQL codes.

We use to call it like this : select TO_DATE ( ATTRIBUTE14 , 'DD-MON-RRRR' ) from csi_item_instances WHERE INSTANCE_ID=10000

It works well across all the client store in US.

But recently we implemented a store in CHINA for the same client. To retrieve data in Chinese language we use to set NLS_LANGUAGE = 'SIMPLIFIED CHINESE' and NLS_TERRITORY = 'CHINA' . Something like as shown bellow.

ALTER SESSION SET NLS_LANGUAGE = 'SIMPLIFIED CHINESE' NLS_TERRITORY = 'CHINA'

Then if we run the same SQL or PL/SQL code.

select TO_DATE ( ATTRIBUTE14 , 'DD-MON-RRRR' ) from csi_item_instances WHERE INSTANCE_ID=10000

its trowing error : ORA - 01843: not a valid month / 01843.0000 - "not a valid month"

We cannot change the all the data because its used by US store as well. Please help me to find out is this a oracle bug or our own issue.

Any help in this ERROR will be appreciated.

Thanks,
Sambit
This post has been answered by theoa on Jun 9 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 7 2011
Added on Jun 9 2011
12 comments
4,041 views