Oracle Message PCC-02393 - SQL statement found inside an EXEC SQL DECLARE SECTION

ERRORSQL statement found inside an EXEC SQL DECLARE SECTION
CAUSEAn executable SQL statement appears inside a DECLARE SECTION.
ACTIONMove the SQL statement into the body of a function.