The problem occurs when executeQuery function runs, the sql statement is work correctly and gives correct results when it is runned on the sql editor. When it is runned on jdbc
This is not possible, you have to separate your queries, of for the best solution you can use procedures or function.
lectureID