请教,我的存储过程
create or replace procedure RCES_P_EQUGUIDLINE_INS  (
p_EQU_ID in varchar2,--装置id
p_GRAN in varchar2,--粒度
p_ORD in varchar2,--次序
p_VDATE in varchar2,--时间
p_ORG_ID in varchar2,--组织id
p_CRT_ER in varchar2,--创建者
p_DYNHZ_VALUE in number,--单因能耗(MES平衡后,按对比【即总部】折算系数计算,单位:标油/吨)
p_DYNHQ_VALUE in number,--单因能耗(MES平衡后,按实际【即企业】折算系数计算,单位:标油/吨)p_JGL_VALUE in number,--装置加工量
p_ISFLAG IN VARCHAR2,
p_DATALX IN VARCHAR2,
p_RESULT out integer--结果
) 我在程序中这样执行exec RCES_P_EQUGUIDLINE_INS 'lk1111','日','0','2008-1-1','003','','0','0','10','0','0','0'
程序报无效的SQL语句
这条语句该怎么写?本人菜鸟,请帮忙看看!多谢!

解决方案 »

  1.   

    exec RCES_P_EQUGUIDLINE_INS('lk1111','日','0','2008-1-1','003','','0','0','10','0','0','0')
    加括号
      

  2.   

    p_RESULT out integer--结果
    这个参数要对应传入一个变量而不是常量
      

  3.   

    declare
    l_result number;
    begin
    exec RCES_P_EQUGUIDLINE_INS('lk1111','日','0','2008-1-1','003','','0','0','10','0','0',l_result)
    end;
      

  4.   

    从表面上看 你的语句少了个括号exec RCES_P_EQUGUIDLINE_INS ('lk1111','日','0','2008-1-1','003','','0','0','10','0','0','0')
      

  5.   

    已经解决了
    我用企业类库的方式调用的存储过程C#代码:
    int result = 0;
    DbCommand dbcommand = Common.DB.GetStoredProcCommand("RCES_P_EQUGUIDLINE_INS");
                    Common.DB.AddInParameter(dbcommand, "p_EQU_ID", DbType.String, item.equ_id);
                    Common.DB.AddInParameter(dbcommand, "p_GRAN", DbType.String, "日");
                    Common.DB.AddInParameter(dbcommand, "p_ORD", DbType.String, "0");
                    Common.DB.AddInParameter(dbcommand, "p_VDATE", DbType.String, item.vdate);
                    Common.DB.AddInParameter(dbcommand, "p_ORG_ID", DbType.String, "003");
                    Common.DB.AddInParameter(dbcommand, "p_CRT_ER", DbType.String, "");
                    Common.DB.AddInParameter(dbcommand, "p_DYNHZ_VALUE", DbType.Decimal, 0);
                    Common.DB.AddInParameter(dbcommand, "p_DYNHQ_VALUE", DbType.Decimal, 0);
                    Common.DB.AddInParameter(dbcommand, "p_JGL_VALUE", DbType.Decimal, item.sumvalue);
                    Common.DB.AddInParameter(dbcommand, "p_ISFLAG", DbType.String, "0");
                    Common.DB.AddInParameter(dbcommand, "p_DATALX", DbType.String, "0");
                    Common.DB.AddOutParameter(dbcommand, "p_RESULT", DbType.Int32, result);
                    Common.DB.ExecuteNonQuery(dbcommand);
    还是非常感谢各位帮我解答!