SQL not properly ended? <p>I know i don't have to use SQL but i have other code between declare begin and end . I just extracted this part and everything works except this . I get the following error:</p> <pre><code>Error report: ORA-06550: line 5, column 5: PL/SQL: ORA-00933: SQL command not properly ended ORA-06550: line 3, column 5: PL/SQL: SQL Statement ignored 06550. 00000 - "line %s, column %s:\n%s" *Cause: Usually a PL/SQL compilation error. *Action: </code></pre> <p>This is the code:</p> <pre><code>DECLARE BEGIN UPDATE octombrie SET nr_imprumut = I.nr from (select book_date bd,count(book_date) nr from rental where to_char(book_date,'mm') like '10' group by book_date) I where data = I.bd; END; / </code></pre> <p>I don't get it what did i do wrong ?</p> <p>EDIT: book_date will give me a day from the month of october. In that day multiple books are rented, so i find out how many books i rented by counting the number of times the same date apears (the rented books are in the rental table). I then take this data and Update October table(i put the number of books aka 'nr' where the date in the october table matches the date in which the books where rented);</p>