我遇到的错误如下:
ORA-06550:遇到以下其中一项时遇到符号“”:“
create or replace PACKAGE BODY ALERTASNOTIFICACIONES AS
PROCEDURE diferidos AS
v_diferido aftdalsa%ROWTYPE;
v_aux varchar2(1000);
begin
v_aux :='UPDATE aftdalsa
set aftdalsa.alsadife = 0
where alsadife = 1
and aftdalsa.alsafeal <= sysdate';
EXECUTE IMMEDIATE v_aux;
EXCEPTION
WHEN OTHERS
THEN dbms_output.put_line(SQLCODE);
END diferidos;
END;
有人可以帮我吗?谢谢
答案 0 :(得分:-1)
您的程序不需要动态SQL:
create or replace PACKAGE BODY ALERTASNOTIFICACIONES AS
PROCEDURE diferidos
AS
begin
UPDATE aftdalsa
SET alsadife = 0
WHERE alsadife = 1
AND alsafeal <= sysdate;
END diferidos;
END;
/