procedure - 在 informix 12.10 中执行过程时出现语法错误
问题描述
我正在尝试在 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;
请帮我解决这个问题。
解决方案
添加一个; 在过程中的删除、插入和选择语句的末尾。不确定你需要一个开始/结束
推荐阅读
- c# - 带有 BackgroundWorker MVVM 的 ProgressBar
- c - 使用消息队列无法发送和接收消息
- tensorflow - 如何使用 Tensorflow 和 Keras 为自定义数据集实现 U Net
- html - 在 chrome 中测试时 CSS 媒体查询不起作用
- javascript - Nodejs 使用 timzone 创建日期
- python-3.x - 为什么我得到 np.nan==None true 不是 false
- mysql - mysql游标更新下一行然后即将到来的行具有旧值或新值
- python - sys.exit() 是否有可能因为外部模块而不会终止?
- ibm-midrange - 当记录尚未写入物理文件时,如何从 RPGLE 中的子文件中删除记录
- python - 如何提高模型损失和准确率?