Sql Return Statment遇到符号错误

时间:2015-07-30 09:03:53

标签: plsql oracle12c

此商店程序正在返回此错误,但我无法找到问题:

  

错误(20,1):PLS-00103:期待时遇到符号“END”   以下之一:。 (* @%& = - +;< /> at in是mod   余数不是rem<>或!=或〜=> =< =<>和或   喜欢like2 like4 likec之间的|| multiset成员submultiset

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;

1 个答案:

答案 0 :(得分:0)

您无法从过程中返回值。

你应该使用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;