Stored procedures PL SQL程序警告编译错误PLS-00103

Stored procedures PL SQL程序警告编译错误PLS-00103,stored-procedures,plsql,syntax-error,plsqldeveloper,Stored Procedures,Plsql,Syntax Error,Plsqldeveloper,我从PL/SQL开始,这是我的第一个过程,我发现编译起来很困难;我已经尝试了这么多不同的版本,我进行了最后一次尝试。我不明白为什么SQLDEVELOPER会说我:“编译的过程(有错误)” 编译器告诉我:“Errore(10,1):PLS-00103:Trovato il simbolo(find)“DECLARE”改为:“begin function pragma procedure subtype current cursor delete previouss” 如果有其他错误(也符合逻辑),

我从PL/SQL开始,这是我的第一个过程,我发现编译起来很困难;我已经尝试了这么多不同的版本,我进行了最后一次尝试。我不明白为什么SQLDEVELOPER会说我:“编译的过程(有错误)”

编译器告诉我:“Errore(10,1):PLS-00103:Trovato il simbolo(find)“DECLARE”改为:“begin function pragma procedure subtype current cursor delete previouss”

如果有其他错误(也符合逻辑),请告诉我。我想提高

谢谢大家的回答

我的程序:

create or replace PROCEDURE calcola_giorn (giornata IN INTEGER) is
  -- si tenga presente che in realtà giornata=idPartita
somma NUMBER;
idcal NUMBER;
nometorn VARCHAR2;
idformaz NUMBER;
nomesquadr VARCHAR2;

DECLARE; 

SELECT idcalendario INTO idcal FROM partita WHERE id= giornata;

SELECT nometorneo INTO nometorn FROM calendario WHERE id= idcal;

CURSOR formazioni_di_giornata IS
    SELECT id, nomesquadra FROM formazione where idpartita= giornata;

CURSOR giocatori_di_giornata IS
    SELECT votogiocatore FROM schiera WHERE idformazione= idformaz;


Begin
OPEN formazioni_di_giornata; 
    FOR tupla_formazione IN formazioni_di_giornata LOOP
      somma:=0;
      FETCH formazioni_di_giornata INTO idformaz, nomesquadr;
        OPEN giocatori_di_giornata;
            FOR tupla_giocatore IN giocatori_di_giornata LOOP
              somma:= somma + tupla_giocatore.votogiocatore;
            END LOOP;
        CLOSE giocatori_di_giornata;
      UPDATE partecipa SET punti= somma WHERE ( (nomesquadra= nomesquadr) AND (nometorneo= nometorn));
      END LOOP;
CLOSE formazioni_di_giornata;

EXCEPTION WHEN OTHERS THEN raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
END calcola_giorn;
  • 应该定义Varchar限制,如varchar2(100)
  • 代替申报;从一开始
  • 在开始之前,所有的光标都应该走
  • 结束;关于程序
  • 您可以在进行这些更改后尝试编译