In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, what the editor shares with you is how to deal with the months when ora01843 is invalid. Many people don't know much about it. Today, in order to let you know more about the months when ora01843 is invalid, I summarized the following contents for you. Let's look down together. I'm sure you'll get something.
What if there is a month with invalid ora01843?
When executing the following SQL statement
Select TO_DATE ('01 FEBMAL 1988, 'DD-MON-YYYY') from dual
The following error occurred:
The date format of the current system time is re-queried and found as follows:
Execute:
SELECT TO_CHAR (sysdate, 'DD-MON-YYYY','NLS_DATE_LANGUAGE =' 'SIMPLIFIED CHINESE''') Chn, TO_CHAR (sysdate,' DD-MON-YYYY','NLS_DATE_LANGUAGE = American') Ame, TO_CHAR (sysdate, 'DD-MON-YYYY','NLS_DATE_LANGUAGE = Japanese') Jap, TO_CHAR (sysdate,' DD-MON-YYYY','NLS_DATE_LANGUAGE = english') EngFROM DUAL
The results are as follows:
From the SQL statement, we can see that the TO_CHAR function on the first and fourth line acquires the system time as china,American,Japanese,English, respectively.
As can be seen from the result chart, the time format under china and Japanese is 27-7-2018.
It can be seen that in the above problems, there will be an error of ORA-01843 when trying to convert the time format to "DD-MON-YYYY", because the system will not recognize the English MON.
So the solution is as follows:
1. Change the time field in the from dual; of select TO_DATE ('01 FEBMB 1988, 'DD-MON-YYYY') to Chinese format, that is, "01-February-1998"
two。 Set the format of its NLS_DATE_LANGUAGE to Aerican or English
ALTER SESSION SET nls_date_language = 'SIMPLIFIED CHINESE'
The above is a brief introduction of how to deal with the months when the ora01843 is invalid. Of course, the differences in the detailed use of the above have to be understood by everyone. If you want to know more, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.