日期转换查询格式条件
select top 10 * from [ProdMasterData2013-10-30]
where convert(varhcar(100),pdate,23)='2013-12-26'
pdate的日期格式为2013-12-27 10:06:32
[解决办法]
select top 10 * from [ProdMasterData2013-10-30]
where convert(varhcar(20),pdate,120)='2013-12-26'
[解决办法]
试试这个,版主的varchar写错了哦。
select top 10 * from [ProdMasterData2013-10-30]
where convert(varchar(10),pdate,121)='2013-12-26'