0
votes

This store procedure is returning this error however i cant see find the problem:

Error(20,1): PLS-00103: Encountered the symbol "END" when expecting one of the following: . ( * @ % & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like like2 like4 likec between || multiset member 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

1 Answers

0
votes

You Cannot return value from a procedure.

you should use FUNCTION to return the value.

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;