【问题标题】:Sql Return Statment Getting encountered symbol errorSql Return Statement 遇到符号错误
【发布时间】:2015-07-30 09:03:52
【问题描述】:

此存储过程返回此错误,但我看不到问题所在:

错误(20,1):PLS-00103:预期时遇到符号“END” 以下之一: 。 ( * @ % & = - + ; > at in is mod 余数不是 rem 或 != 或 ~= >= 和 or like2 like4 likec 之间 ||多重集成员子多重集

create or replace procedure SP_CurrancyOfProject(V_AssyId number) as
temp number := 0;
begin 
Select Scope_ID 
     into Temp
     from tbl_Revisions
     where Assy_U_ID = V_AssyId;
Select Project_ID 
     into temp
     from tbl_Scope
     Where Scope_U_ID = temp;
Select Currancy_Multipier
     into temp
     from tbl_Currancy
     where Project_ID = temp;

return temp;
end;

【问题讨论】:

    标签: plsql oracle12c


    【解决方案1】:

    您不能从过程中返回值。

    你应该使用 FUNCTION 来返回值。

    create or replace FUNCTION FN_CurrancyOfProject(V_AssyId number) RETURN NUMBER 
    as
    temp NUMBER := 0;
    
    BEGIN 
    
    -- YOUR CODE LOGIC for substituting temp variable.
    
    return temp;
    
    END;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-06-06
      • 1970-01-01
      • 2019-07-31
      • 2015-12-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多