-2
執行下面的過程中出現錯誤。在oracle中執行過程期間發生錯誤
CREATE OR REPLACE PROCEDURE P_SUMIT (P_FEED IN FEED.FEED_ID%TYPE, P_OPCO_ID IN FEED.OPCO_ID%TYPE)
AS
BEGIN
DECLARE V_PCF_PATTERN FEED.PCF_PATTERN%TYPE;
DECLARE CURSOR C_FEED FOR SELECT PCF_PATTERN FROM FEED WHERE FEED_ID=P_FEED AND OPCO_ID=P_OPCO_ID;
OPEN C_FEED;
LOOP
FETCH C_FFED INTO V_PCF_PATTERN;
EXIT WHEN C_FEED%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(V_PCF_PATTERN);
END LOOP;
CLOSE C_FEED;
END;
錯誤日誌:
3/1 PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following:
begin function pragma procedure subtype type <an identifier>
<a double-quoted delimited-identifier> current cursor delete
exists prior external language
The symbol "begin" was substituted for "DECLARE" to continue.
4/1 PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following:
begin function pragma procedure subtype type <an identifier>
<a double-quoted delimited-identifier> current cursor delete
exists prior
請協助。
CURSOR FOR SELECT? – SriniV
謝謝,我沒有注意到它,只是從OP的格式。 –
我也回答了同樣的問題,並且有人回答了一個問題。所以我刪除它。仍然奇怪爲什麼downvotes,也沒有理由。 – SriniV