画面传来两个值开始和结束日期st1,st2,数据库中的是dataday
我想查询
select count(*) from table where dataday>st1 and dataday <st2
请问怎么写啊??
------解决方案--------------------
用to_date函数转换成对应的date格式,如
select count(*) from table where dataday>to_date('20111025','yyyymmdd') and dataday <to_date('20111028','yyyymmdd')
------解决方案--------------------
1L 正解
------解决方案--------------------
------解决方案--------------------
无需字符处理,ORACLE有自动类型转化的,只要输入的字符是规则的日期型的
select date_column from tableA where date_column >'2011-05-06'