我把WHERE后面的一些条件删掉就可以创建了,是不能用占位符吗?
WHERE
a.is_delete = 0
AND a.method_type = '%s'
AND a.eqpt_id = '%s'
AND '%s' BETWEEN dateadd (
mi,
- 1 * ABS( case a.lead_time when 0 then 30 else a.lead_time end ), a.trigger_time
)
AND dateadd ( hh, 12, a.trigger_time );
|