你的sql语句相当于select * from cust_info_back where cust_back_time ='2003-11-24 16:23:40'

解决方案 »

  1.   

    try
    select * from cust_info_back where cust_back_time  between '2003-11-24 16:23:40' and '2003-11-24 16:23:40'
      

  2.   

    select * from cust_info_back where cust_back_time >=cast('2003-11-24 16:23:40'
    as datetime) and 
    cust_back_time <=cast('2003-11-24 16:23:40'  as datetime)
      

  3.   

    把时间范围放大一点试试:
    select * from cust_info_back where cust_back_time >='2003-11-24 16:23:40' and 
    cust_back_time <='2003-11-24 16:23:41' 
      

  4.   

    select * from cust_info_back where cust_back_time  between '2003-11-24 16:23:40' and '2003-11-24 16:23:41'
      

  5.   

    我看了一下,表中是这样的'2003-11-24 16:23:41.093',我rst("cust_back_time")取出来'2003-11-24 16:23:41'这样子的,所以不对,有什么办法吗?
      

  6.   

    select * from cust_info_back where cust_back_time >='2003-11-24 16:23:40.001' and 
    cust_back_time <='2003-11-24 16:23:40.099'
      

  7.   

    select * from cust_info_back where cust_back_time >=cast('2003-11-24 16:23:40.001' as varchar(19)) and 
    cust_back_time <=cast('2003-11-24 16:23:40.099' as varchar(19))
      

  8.   

    select * from cust_info_back where convert(varchar(20),cust_back_time,120) ='2003-11-24 16:23:40'