I got an error
我有一個錯誤
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following: [...]
PLS-00103:在期待以下內容時遇到符號“文件結束”:[…]
when running an anonymous procedure (with Oracle):
在運行匿名程序時(與Oracle):
BEGIN
DECLARE
seq number(12);
pk number(12);
BEGIN
loop
select mod_sdemol.nextval into seq from dual;
select idn_demol into pk from demol where demol.idn_demol=seq;
exit when pk is null;
end loop;
INSERT INTO "T_MOD"."DEMOL" (IDN_DEMOL, COD_MOL, PATH, IND_BLOK) VALUES (seq, '13000501', 'V', 'S');
END;
What I am trying to do is iterate through a sequence to prevent conflicts with existing data. According to the answers in this question, a PL/SQL procedure should do something with selected data, but all my SELECTs have INTOs.
我要做的是迭代一個序列,以防止與現有數據的沖突。根據這個問題的答案,PL/SQL過程應該對選定的數據做一些事情,但是我所有的選擇都有INTOs。
What am I doing wrong or what am I missing?
我做錯了什么,我錯過了什么?
2
You don't need the first BEGIN
. Each BEGIN
keyword must match an END
keyword.
你不需要第一個開始。每個開始關鍵字必須匹配一個結束關鍵字。
本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2013/08/14/725130c760156cfc13f4a30b1637371d.html。