日期:2014-05-18 浏览次数:20379 次
declare @t1 varchar(10) set @t1='2010-7-26' select convert(varchar(10),cast(@t1 as datetime),120) /* 2010-07-26 */
------解决方案--------------------
select sum(value) from jxc where Convert(varchar(10),Sdate,120) between convert(varchar(10),cast('2010-7-26' as datetime),120) and convert(varchar(10),cast('2010-8-25' as datetime),120)