| 表A,有时间字段1,数值字段2,当时间过滤组件小于某个具体日期时,查询出来的是历史无用的值,需要显示为空。 select 时间字段1,数值字段2 from 表A where 1=1 ${if(len(date)=0,""," and cast(具体日期 as timestamp) <=cast('"+date+"' as timestamp) ")} 直接在where子句中做比较,这些记录无法显示。时间过滤组件绑定的数据集参数date无法直接在select里面使用。 要怎么写SQL呢。 | 
 立即参与
              立即参与
          