当前位置:网站首页>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 ......
边栏推荐
- NCBI experience accumulation
- 看了就会的 Rainbond 入门教程
- Node.js+express realizes the operation of MySQL database
- 为 @CloudStorage 添加了类 @Published 的能力
- How to perform batch operations in core data
- [Tanabata] Tanabata lonely little frog research edition? The final chapter of Tanabata Festival!
- Log management platform of infrastructure and nail & email alarm notification
- SSH service
- 基础架构之日志管理平台及钉钉&邮件告警通知
- I am using a blog creation tool
猜你喜欢

Store and guarantee rancher data based on Minio objects

Introduction to MITK

看了就会的 Rainbond 入门教程

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

Hard disk partition method

Creating, deleting and viewing Anaconda virtual environment

Product Manager

Raspberry pie foundation | summarize and record some operations in the learning process of raspberry pie

Chapter I Introduction

9、 Uni popup usage popup effect at the bottom of the drop-down box
随机推荐
Chapter 3 stack, queue and array
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
Swiftui 4.0's new navigation system
21、 TF coordinate transformation (I): coordinate MSG message
Summarize the knowledge points of the ten JVM modules. If you don't believe it, you still don't understand it
Redis-配置文件讲解
How does core data save data in SQLite
How to use the C language library function getchar ()
C language program: judging triangles
PS modify the length and width pixels and file size of photos
linear transformation
实时切换 Core Data 的云同步状态
linux安装redis
How to perform batch operations in core data
Swiftui layout - alignment
19、 ROS parameter name setting
Redis-持久化
Hard disk partition method
Penguin side: why not recommend using select *?
&0xffffffff(0x08)