title: Cannot write if or select above begin on a procedure
body: <p>Im building a procedure for a class proyect where i have to invent some procedure related to my country football league. Right now im developing a procedure to show the results of a match, with the trainer, players, cards and goals after introducing the league round and a team. The thing is, i cant set the date of the round to a variable i created with an if due to a expected one of the following error on the if structure ( i have created just two rounds so that is the reason there are only two conditions), and i cant select data from tables into the other variables i have created for storing the data that doesnt need to be on the cursor due to being unique for each match, the referees names and the trainers names, but there is also another &quot;expecting&quot; error. Any help? Thank you in advance!
  PS: The rest of the code is still on development so there could be some incomplete parts. Arbitro stands for referee, entrenador stands for trainer or manager, nombre stands for name and partido stands for match
  Error:<a href="https://i.stack.imgur.com/Bu5DO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bu5DO.png" alt="enter image description here" /></a></p>
  <pre><code>create or replace PROCEDURE COMPROBARPARTIDO(JORNADA IN NUMBER, EQUIPO IN VARCHAR2) AS 
  
  FECHA DATE;
  ELOCAL VARCHAR2(30);
  EVISITANTE VARCHAR2(30);
  ARBIP VARCHAR2(30);
  ASISTENTE VARCHAR2(30);
  IF JORNADA = 1 THEN
  FECHA:=4-03-2021;
  ELSIF JORNADA = 2 THEN
  FECHA:=13-03-2021;
  ELSE
      DBMS_OUTPUT.PUT_LINE('ERROR');
  END IF;
  
  SELECT APR.NOMBRE INTO ARBIP, ASS.NOMBRE INTO ASISTENTE, ENL.NOMBRE INTO ELOCAL, ENV.NOMBRE INTO EVISITANTE
  FROM  PARTIDO_JUGADOR PA
  INNER JOIN PARTIDO P
  ON PA.ID_PARTIDO = P.ID
  INNER JOIN EQUIPO EL 
  ON P.ID_LOCAL =EL.ID
  INNER JOIN EQUIPO EV
  ON P.ID_VISITANTE = EV.ID
  INNER JOIN ENTRENADOR ENL
  ON EL.ID_ENTRENADOR = ENL.ID
  INNER JOIN ENTRENADOR ENV
  ON EV.ID_ENTRENADOR = ENV.ID
  INNER JOIN PARTIDO_ARBITRO PAR
  ON P.ID = PAR.ID_PARTIDO
  INNER JOIN ARBITRO APR
  ON PAR.ID_ARBITROC = APR.ID
  INNER JOIN ARBITRO ASS
  ON PAR.ID_ARBITROA = ASS.ID
  WHERE P.FECHA = FECHA AND (EQUIPO =EV.NOMBRE OR EQUIPO = EL.NOMBRE);
  
  
  CURSOR C1 IS
  SELECT J.NOMBRE, J.APELLIDO, EQ.NOMBRE
  FROM PARTIDO P
  INNER JOIN PARTIDO_JUGADOR PJ
  ON P.ID = PARTIDO_JUGADOR.ID_PARTIDO
  INNER JOIN JUGADOR J
  ON PJ.ID_JUGADOR = J.ID
  INNER JOIN EQUIPO EQ
  ON J.ID_EQUIPO = EQ.ID
  ORDER BY EQ.ID, J.COD_POSICION ;
  
  BEGIN
    NULL;
  END COMPROBARPARTIDO;
  </code></pre>