select count(*) from table where 时间>='*2011-01-01  08:00:00*' and 时间<='*2014-01-01  00:00:00*' 
我记得在access里时间类型运行是需要加*

解决方案 »

  1.   

    access的日期要加上 # where date between #2014-10-20# and #2014-11-02#
      

  2.   

    哦抱歉,是用# 而不是‘
    select count(*) from table where 时间>=#2011-01-01  08:00:00# and 时间<=#2014-01-01  00:00:00#
      

  3.   

    那请问如果我想统计每天08:00:00到20:00:00的记录都有哪些,应该怎么写呢?直接改成时间>=#08:00:00# and 时间<=#20:00:00#是统计不出来的
      

  4.   

    再求助大神们一个问题:DELETE 表1,表2,表3 FROM (表1 LEFT JOIN 表2 ON 表1.编码a= 表2.编码a) LEFT JOIN 表3 ON 表1.编码 b= 表3.编码b where 表1.编码a='" + dataGridView1.Rows[i].Cells[0].Value.ToString() + "'这句删除语句有什么问题嘛?不知道错在哪了,怎么实现三表关联然后把三个表里的该记录都删除呢?
      

  5.   

    '" + dataGridView1.Rows[i].Cells[0].Value.ToString() + "'取值没有问题,主要是前面语句不知道怎么改