日期:2014-05-17 浏览次数:20533 次
SELECT * FROM [upreport_wl_jg2] where 日期 between '2012-9-1' and '2012-9-9'
SELECT * FROM [upreport_wl_jg2] where 日期 between '2012-9-1' and '2012-9-15'
--试试下面的 SELECT * FROM [upreport_wl_jg2] where cast(日期 as datetime) between '2012-9-1' and '2012-9-9'
------解决方案--------------------
很大的可能就是 你的日期字段不是datetime 类型的 是个字符串
--try SELECT * FROM [upreport_wl_jg2] where cast(日期 as datetime) between '2012-9-1' and '2012-9-9'
------解决方案--------------------
SELECT * FROM [upreport_wl_jg2] where convert(char(10),日期 ,120) between '2012-09-01' and '2012-09-09'
------解决方案--------------------
太多了,这里文章,拉到最下面,有各种格式http://blog.csdn.net/dba_huangzj/article/details/7657979