I have encountered the same error with Toad 126.96.36.1993. Few users have reported this problem in the beginner area. From what I have seen, Toad inserts its own statement in the middle of the user's DECLARE CURSOR statement (in both PROCEDURE and FUNCTION) causing SQL error. Does anyone have a workaround? Thank you.