当前位置:网站首页>SQL error [1810] [22008]: ora-01810: format code occurs twice
SQL error [1810] [22008]: ora-01810: format code occurs twice
2022-07-28 14:58:00 【Taibai Shenlong】
1、Oracle database , Today, query the display data according to the time and date ,SQL The sentence is :
SELECT * FROM JCTJ_JXDB WHERE
DATAMONTH = TO_DATE('2021-11-29 15:12:54','YYYY-MM-dd HH:mm:ss'), Then prompt the error information as follows :

2、 The main reason is that QL Case insensitive in ,MM and mm Is considered to be the same format code , therefore Oracle Of SQL Adopted mi Instead of minutes , Amend as follows SQL that will do :SELECT * FROM JCTJ_JXDB WHERE
DATAMONTH = TO_DATE('2021-11-29 15:12:54','YYYY-MM-dd HH:mi:ss'), After execution , Report the following error prompt :

3、 This is because we use 24 hourly , If our time is 0-12 Between , Yes, you can use HH It means , But now the hour we query is 15, Greater than 12, Therefore, you need to use HH24 To represent hours ,SQL The statement is as follows :
SELECT * FROM JCTJ_JXDB WHERE
DATAMONTH = TO_DATE('2021-11-29 15:12:54','YYYY-MM-dd HH24:mi:ss')We often encounter similar date and time queries , I hope that's helpful ......
What a long long road! , I will go up and down ......
边栏推荐
- Hard disk partition method
- 10、 C enum enumeration
- @Solution to DS ('slave') multi data source compatible transaction problem
- View gnuradio version
- How to perform batch operations in core data
- Redis-Redis在Jedis中的使用
- 468 product planning and promotion plan (150 copies)
- Added the ability of class @published for @cloudstorage
- Qtableview in QT sets three methods of paging display [easy to understand]
- 4、 C language operators
猜你喜欢
Some problems encountered in the development of Excel VBA, solutions, and continuous updates

10、 Timestamp

58子站安居,经纪人营销管理平台登录接口加密逆向

Chapter I Introduction

How to make the characters in the photos laugh? HMS core video editing service one click smile function makes people smile more naturally

9、 Uni popup usage popup effect at the bottom of the drop-down box

MQTT入门级简单介绍与使用

Redis configuration file explanation

OKR and grad

【七夕】七夕孤寡小青蛙究极版?七夕节最终章!
随机推荐
19、 ROS parameter name setting
Keras reported an error using tensorboard: cannot stop profiling
为自定义属性包装类型添加类 @Published 的能力
First class exercise
58 sub station Anju, broker marketing management platform login interface encryption reverse
MITK creates plug-ins and generates plug-ins
9、 C array explanation
35道MySQL面试必问题图解,这样也太好理解了吧
Examples of Pareto optimality and Nash equilibrium
Redis-Redis在Jedis中的使用
3、 C language storage class
实时切换 Core Data 的云同步状态
2、 Declaration and definition of variables and constants
VTK vtkcontourwidget extracts regions of interest
Process finished with exit code-1073740791(0xC0000409)
Swiftui layout - size (bottom)
NCBI experience accumulation
Create a table under swiftui with table
16、 Launch file label of ROS (II)
QT hex, decimal, qbytearray, qstring data conversion