【问题标题】:Getting syntex error while executing procedure in informix 12.10在 informix 12.10 中执行过程时出现语法错误
【发布时间】: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;

请帮我解决这个问题。

【问题讨论】:

    标签: procedure informix


    【解决方案1】:

    在过程中的 delete、insert 和 select 语句的末尾添加 ;。 不确定你需要一个开始/结束

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-16
      • 1970-01-01
      • 2013-10-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-03
      相关资源
      最近更新 更多