【发布时间】:2021-08-22 04:31:35
【问题描述】:
我正在尝试在 Informix 12.10 中创建一个具有 2 个输入参数的过程。我想在表格中插入时间过滤结果。但是当我执行这段代码时,我得到了一个语法错误。
create dba procedure informix.damper_count (from_date nvarchar(25),to_date nvarchar(25))
begin
delete damper_count_temp
insert into damper_count_temp (station,device,event,count)
select *
from (select 'SWA' ,'TVD 01' ,'Damper Close' ,count(cmrl_desccol ) from "informix".alarms
where desccol LIKE '%%SWA_TVD_1 - Damper Close%' and LocalCol between from_date and to_date
union
select 'SWA' ,'TVD 01' ,'Damper Open' ,count(cmrl_desccol ) from "informix".alarms
where desccol LIKE '%%SWA_TVD_1 - Damper Open%' and LocalCol between from_date and to_date )
end
end procedure;
请帮我解决这个问题。
【问题讨论】: