ora的字符串与时间比较
2011-07-06 23:02
204 查看
select * from table_name where sysdate>=to_date(str_date1,’yyyy-mm-dd’) and sysdate<=to_date(str_date2,’yyyy-mm-dd’) --> 失败
select * from table_name where to_char(sysdate,'yyyy-mm-dd')>=limit_date and to_char(sysdate,'yyyy-mm-dd')<=unlimit_date --> 成功
无知确实很可怕。ora的date与varchar确实太厉害了。佩服!
select * from table_name where to_char(sysdate,'yyyy-mm-dd')>=limit_date and to_char(sysdate,'yyyy-mm-dd')<=unlimit_date --> 成功
无知确实很可怕。ora的date与varchar确实太厉害了。佩服!
相关文章推荐
- Java字符串转换为日期和时间比较大小
- Java字符串转换为日期和时间比较大小
- 【代码笔记】两个时间字符串的比较
- Oracle修改时间报:ORA-01830: 日期格式图片在转换整个输入字符串之前结束的解决办法
- android中的时间比较大小以及字符串转换为时间
- JS字符串时间比较+计算时间差
- 时间转字符串,时间比较
- Shell脚本:时间相关、遍历目录、for、if、字符串比较、数字比较
- //四舍五入//得到倒序//比较字符串//拦截时间,实现超时锁屏//判断是否越狱//配置PodFile//Storyboard中跳转操作//处理不可逆的push界面操作
- javascript可以直接比较时间字符串的大小
- 日期字符串转时间戳比较
- 计算两日期相差天数(用字符串格式的时间形式来比较)、将时间戳转为字符串,开始到结束的时间差(用时间戳来比较)
- 解决js中字符串格式的时间比较问题
- 如何比较两个时间字符串的大小
- JS中字符串转化为日期然后比较时间先后
- Java字符串转换为日期和时间比较大小
- javascript可以直接比较时间字符串的大小
- 字符串转换成时间格式,并与本时区当前时间,比较大小。
- JS中字符串转化为日期然后比较时间先后
- 在js中如何比较两个时间字符串的大小