2005-11-30 = 2005-11-30 00:00:00select thread_title,threadID from JB_thread where postuserid=428 and (posttime BETWEEN #2005-11-01 00:00:00# and #2005-11-30 23:59:59#)

解决方案 »

  1.   

    select thread_title,threadID from JB_thread where postuserid=428 and (posttime BETWEEN #2005-11-01# and #2005-12-1#)
      

  2.   

    对,应该是时间部份造成的select thread_title,threadID from JB_thread where postuserid=428 
    and posttime >= #2005-11-01# 
    and posttime < #2005-12-1#
      

  3.   

    select thread_title,threadID from JB_thread where postuserid=428 
    and convert(varchar(8),posttime,120) >= #2005-11-01# 
    and convert(varchar(8),posttime,120)< #2005-12-1#
      

  4.   

    select thread_title,threadID from JB_thread where postuserid=428 and (posttime BETWEEN #2005-11-01# and #2005-11-30#)这句里面的#2005-11-30#
    系统自动将它理解为
    2005-11-30 00:00:00.000所以<=2005-11-30 00:00:00.000 自然就没有2005年11月30日的数据了。
      

  5.   

    select thread_title,
           threadID
    from JB_thread 
    where
        postuserid=428
        and posttime> #2005-10-31#
        and posttime< #2005-12-01#