title: Oracle Database PLSQL Error: PLS-00103
body: <p>I'm writing simple function in Oracle Database 11g that count summary salary for employee. For this we need to count days with specific status. Days is present as fields in table (Day_1, Day_2, ..., Day_30).<br>
  But i have got error during compilation:<br>
  <code>Error(50,9): PLS-00103: Encountered the symbol ";" when expecting one of the following: :=.(@%;</code><br>
  Code of my package (a place where there is an error marked in code of function <code>f2</code>):</p>
  
  <pre><code>CREATE OR REPLACE PACKAGE pack IS
      FUNCTION f1 (id IN NUMBER) return t2 PIPELINED;
      FUNCTION f2 (id IN NUMBER) return number;
  end pack;
  /
  CREATE OR REPLACE PACKAGE BODY pack IS
  
  FUNCTION f1 (id IN NUMBER) return t2 PIPELINED IS
  
    name      VARCHAR2(50);
    num       number;
  
  BEGIN
  
    FOR i IN 1 .. id LOOP
  
      SELECT отдел
        into name
        from отдел
        where ид_отдела = i;
  
      select sum(КОЛИЧЕСТВО)
        into num
        from Таблица_3
        join Таблица_2
        on Таблица_3.КТО_ПРОДАЛ = Таблица_2.ЧЛВК_ИД
        where отдел = i;
  
      PIPE ROW( t1(i, name, num) );
  
    END LOOP;
  
    RETURN;
  
  END f1;
  
  FUNCTION f2 (id IN NUMBER) return NUMBER AS
  
    WorkingDays     NUMBER := 0;
    CurrentDay    VARCHAR2(50);
    Salary        NUMBER := 120;
    Total           NUMBER := 0;
  
  BEGIN
  
    FOR i IN 1 .. 30 LOOP
  
      EXECUTE IMMEDIATE 'SELECT День_' || i || ' FROM Таблица_2 WHERE ЧЛВК_ИД = id INTO CurrentDay';
  
      IF WorkingDays IN ('КОМАНДИРОВКА','ВЫХОДНОЙ','ПРАЗДНИК') THEN -- &lt;--- Here
        WorkingDays := WorkingDays + 1;
      END IF;
  
    END LOOP;
    Total : = Salary * WorkingDays;
  
    RETURN Total;
  
  END f2;
  
  end pack;
  /
  </code></pre>
  
  <p>How can i solve this? Maybe the problem is in the logic of the program?</p>