select TestTime, CAST('20'+replace(TestTime, '/', '-') as date) as TestTime
from #tmp
where CAST('20'+replace(TestTime, '/', '-') as date) between '2014-06-01' and '2014-06-01'
(杨哥提供)
select TestTime, CAST('20'+replace(TestTime, '/', '-') as date) as TestTime
from #tmp
where CAST('20'+replace(TestTime, '/', '-') as date) between '2014-06-01' and '2014-06-01'
(杨哥提供)