日期:2014-05-16  浏览次数:20885 次

关于日期范围的选择问题
select   *   from   xxx   where   date   between   '2007-1-1   12:00:00 '   and   '2007-2-1   12:00:00 '

select   *   from   xxx   where   time   >   '2006-1-1   10:00:00 '   and   time   <   '2007-2-2   10:00:00 '  
都说 "标准表达式中数据类型不匹配 ",请问是怎么回事啊?我用 "insert   into   xxx   values   ( '2006-1-1   10:00:00 ') "正常啊,怎么不匹配了呢?

------解决方案--------------------
select *
from xxx
where [time] > #2006-1-1 10:00:00# and time < #2007-2-2 10:00:00#