首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Access >

关于日期范围的选择有关问题

2012-02-10 
关于日期范围的选择问题select*fromxxxwheredatebetween2007-1-112:00:00and2007-2-112:00:00和select*fro

关于日期范围的选择问题
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#

热点排行