日期:2014-05-18 浏览次数:20682 次
SELECT COUNT(1) FROM A1 WHERE CONVERT(VARCHAR(8),A1.TEST_DATE, 112) >= CONVERT(VARCHAR(8), '2012-06-01', 112) --大于 AND CONVERT(VARCHAR(8),A1.TEST_DATE, 112) <= CONVERT(VARCHAR(8), '2012-06-11', 112) --小于
SELECT COUNT(1) FROM A1 WHERE CONVERT(VARCHAR(10),A1.TEST_DATE, 112) between CONVERT(VARCHAR(10), '2012-06-01', 112) --大于 AND CONVERT(VARCHAR(10), '2012-06-11', 112) --小于
------解决方案--------------------