While writing the below pl/sql procedure,
CREATE OR REPLACE PROCEDURE RTSPGMR."COMPARE"
DECLARE CURSOR comp IS
select EFF_DT,LOC_EFF_DT_FK from dcp d,loc l where D.LOC_CD_FK=L.LOC_CD;
BEGIN
for c1 in comp LOOP
if EFF_DT=LOC_EFF_DT_FK THEN
dbms_output.put_line('dates are equal');
Else
dbms_output.put_line('dates are not equal');
end if;
END LOOP;
COMMIT;
END;
I am getting the following error.
[Error] PLS-00103 (5: 1): PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following: ( ; is with authid as cluster compress order using compiled wrapped external deterministic parallel_enable pipel