Oracle Error ORA-34658: (MXSQL25) The words CURSOR FOR TEXT must be followed by a compile-time text expression specifying a SELECT command.

Oracle Error Message

ORA-34658: (MXSQL25) The words CURSOR FOR TEXT must be followed by a compile-time text expression specifying a SELECT command.

Reason for the Error

A SQL DECLARE CURSOR FOR TEXT command lacked a text expression, or the expression was otherwise invalid.

Solution

Specify a single text expression that can be evaluated at compile time to yield a SELECT statement