i have this loop with a procedur, but its run in a error:
ORA-06550: line 18, column 9:
PLS-00103: Encountered the symbol "CELLNEX_HI3GNY2017" when expecting one of the following:
:= . ( @ % ; immediate
The symbol ":=" was substituted for "CELLNEX_HI3GNY2017" to continue.
Error at Line: 7 Column: 0
meaning with this loop is the procedure is dynamically executed, the value v_sidcount is a counter, and the procedure stops when the result in v_sidcount is NULL.
DECLARE
v_sidcount number;
--
v_cid number := 32;
v_sptid number := 215;
v_sptid0 number := 32;
v_sptid1 number := 57;
v_sptid2 number := 217;
v_sptid3 number := 218;
BEGIN
LOOP
SELECT count(sid) into v_sidcount FROM sitetb
WHERE NOT EXISTS (SELECT sid FROM KAM_REPORT_CEL_HI3GNY2017
WHERE sid = sitetb.sid
) and cid = v_cid and sptid IN (v_sptid0, v_sptid1, v_sptid2, v_sptid3);
EXECUTE CELLNEX_HI3GNY2017();
IF v_sidcount is NULL THEN
exit;
END IF;
END LOOP;
END;