select  * from ActivityCourse where 1=1 
and ('17/11/2012' between 'startDate' and 'endDate' ) 
or ( '13/11/2012' between 'startDate' and 'endDate' ) 
打了这条sql为什么没有数据显示 

解决方案 »

  1.   

    select  * from ActivityCourse where 1=1 
    and ('17/11/2012' between startDate and endDate ) 
    or ( '13/11/2012' between startDate and endDate ) 
    去掉 字段的引号 startdate enddate
      

  2.   

    select  * from ActivityCourse where 1=1 
    and ('2012-11-17' between startDate and endDate ) 
    or ( '2012-11-13' between startDate and endDate ) 
    什么数据库?
      

  3.   

    select  * from ActivityCourse where 1=1 
    and ('2012-11-17' between startDate and endDate ) 
    or ( '2012-11-13' between startDate and endDate ) 
    要看你startdate 与ENDDATE是什么类型?
      

  4.   

    你是不是在access数据库中做sql查询   如果是 则按照正常格式书写即可
    select  * from ActivityCourse where 1=1 
    and ('2012-11-17' between startDate and endDate ) 
    or ( '2012-11-13' between startDate and endDate )