I have a problem with compiling simple piece of code in PL/SQL. Here comes the code:
DECLARE
zm VARCHAR(20);
BEGIN
SELECT TEA_FIRST_NAME into zm
from students join teachers on STU_TEA_ID = TEA_ID
where STU_ID = (select k.STU_ID from students k where k.STU_FIRST_NAME =
:BLOCK9.TEXT_ITEM11);
END;
When I try to compile this I see that error:

However, when I run this piece of code in SQL Navigator:
SELECT TEA_FIRST_NAME
from students join teachers on STU_TEA_ID = TEA_ID
where STU_ID = (select k.STU_ID from students k where k.STU_FIRST_NAME =
'Lukasz');
it runs fine and returns one record. What is happening?
I am using Oracle Forms 10g (10.1.2.3.0) PL/SQL (10.1.0.5.0). Database version 11.2.0.3.0
JOINwithINNER JOIN.