title: pl/sql block, weird errors with simple script
body: <p>I'm writing very simple block code in pl/sql:</p>
  
  <pre><code>DECLARE
    dateof21 DATE;
    dzien number;
    dzien_tyg number;
  BEGIN
  
  dateof21:= '2001-01-01';
  
  WHILE dateof21 != '2101-01-01' LOOP
  
   SELECT EXTRACT(day from date dateof21) INTO dzien from dual;
  
   select to_char(date dateof21,'D') INTO dzien_tyg from dual;
  
  if ((dzien=13) AND (dzien_tyg=5)) THEN
  
    dbms_output.put_line(to_char(dateof21));
  
  end if;
  
    dateof21:= dateof21+1;
  
  END LOOP;
  
  END;
  </code></pre>
  
  <p>but i'm getting very annoying errors:</p>
  
  <blockquote>
    <p>ORA-06550: linia 8, kolumna 26:<br>
    PL/SQL: ORA-00936: brak wyrażenia<br>
    ORA-06550: linia 8, kolumna 2:<br>
    PL/SQL: SQL Statement ignored<br>
    ORA-06550: linia 9, kolumna 17:<br>
    PL/SQL: ORA-00936: brak wyrażenia<br>
    ORA-06550: linia 9, kolumna 2:<br>
    PL/SQL: SQL Statement ignored<br>
    06550. 00000 -  "line %s, column %s:\n%s"</p>
  </blockquote>
  
  <p>I really tried to find whats wrong, but everything seems just fine. Can anybody help? it should write on output all fridays which are 13th day of month btw.</p>