sql - where 条件 - ORA-01861: 文字与格式字符串不匹配
问题描述
在我的 where 条件下,我需要检查特定日期列不等于特定日期.. 我该怎么做
目前我已经写了
gsaTs.X_GSA_ARRIVE_ONSITE <> '1753/01/01'
我收到以下错误
[Error] Execution (189: 49): ORA-01861: literal does not match format string
解决方案
尝试使用to_date()
并指定匹配的格式字符串。
gsaTs.X_GSA_ARRIVE_ONSITE <> to_date('1753/01/01', 'YYYY/MM/DD')
推荐阅读
- android - SQLite、MongoDB 和 React-Native 的组合可能吗?
- ruby - col 如何在 Ruby 代码中获取其值:Array.new(cells) { |col| PolarCell.new(行,列)}
- visual-studio-code - Visual Studio Code 等待和弦的第二个键。(Ctrl + A)
- c# - Xamarin Forms,HttpClient 类 - GetStringAsync 和 GetAsync 返回空值并快速退出函数
- git - git'在angular2中不被识别为内部或外部命令、可运行程序或批处理文件
- laravel - 如何将徽标保存到公用文件夹中
- matrix - 为什么 Julia 在某些情况下不能识别 NaN?
- elasticsearch - 将非索引字段(JSON)存储为对象而不是 Elasticsearch 中的文本是否有任何额外开销
- javascript - TypeScript - 基于枚举比较的 Switch 语句直接进入 DefaultCase
- mysql - 如何选择每个组的最后一个条目?