当前位置:网站首页>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 ......
边栏推荐
- 15、 Launch file label of ROS (I)
- Hand in hand from 0 to a "Nuggets special attention" Google plug-in, 5000 words detailed vue3 responsive principle, the advantages, disadvantages and choices of several cache read-write schemes, flyin
- 58 sub station Anju, broker marketing management platform login interface encryption reverse
- Simple data analysis using Weka and excel
- Swiftui layout - alignment
- 19、 ROS parameter name setting
- Error reason for converting string to long type: to convert to long type, it must be int, double, float type [easy to understand]
- 为 @CloudStorage 添加了类 @Published 的能力
- Getting started with scottplot tutorial: getting and displaying values at the mouse
- 23、 TF coordinate transformation (III): dynamic coordinate transformation
猜你喜欢

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

PS modify the length and width pixels and file size of photos

linux安装redis

企鹅一面:为什么不建议使用SELECT * ?

使用Weka与Excel进行简单的数据分析

linux安装mysql

9、 C array explanation

Redis redis use in jedis

21、 TF coordinate transformation (I): coordinate MSG message

7月29日 ApacheCon|Apache Pulsar 在 vivo 的探索与实践 即将开播
随机推荐
Swiftui layout - size (bottom)
如何让照片中的人物笑起来?HMS Core视频编辑服务一键微笑功能,让人物笑容更自然
Install scikit learn journey
Added the ability of class @published for @cloudstorage
Some considerations for installing Oracle11g
Robot mathematics foundation 3D space position representation space position
How to reduce the resolution of only 3D camera but not UI camera
23、 TF coordinate transformation (III): dynamic coordinate transformation
Pytorch GPU installation
Animation mechanism of swiftui
SwiftUI 布局 —— 对齐
Second class exercise
Core Data 是如何在 SQLite 中保存数据的
Shell command
Why can the anonymous functions of JQ access the methods inside
Node.js+express realizes the operation of MySQL database
Redis persistence
Getting started with scottplot tutorial: getting and displaying values at the mouse
SSH service
Product Manager