我是一个SQL Server专家,正在与PLSQL斗争。我认为这是我使用p_rc光标的方式
CREATE OR REPLACE PROCEDURE "SP_EMAILLINKSCRUD" (
pAction IN nvarchar2,
pStormId IN number,
p_rc OUT Pkg_Types.grc
)
AS
BEGIN
if pAction = 'getManagerEmails' then
OPEN p_rc FOR
select * from table1;
else if pAction = 'getSentEmailLinks' then
OPEN p_rc FOR
select *
from table2
where stormId = pStormId;
end if;
END SP_EMAILLINKSCRUD;
答案 0 :(得分:4)
您在此处开始了一个新的嵌套if
,但没有将其关闭:
else if pAction = 'getSentEmailLinks' then
应该是:
elsif pAction = 'getSentEmailLinks' then