CREATE OR REPLACE PROCEDURE index_rebuilt (
table_name IN VARCHAR2)
IS
TYPE cv_type IS REF CURSOR;
cv cv_type;
val VARCHAR2(32767);
BEGIN
/* Construct the very dynamic query and open the cursor. */
OPEN cv FOR
'select index_name from dba_indexes where table_name = ' || table_name ||
'and status = "UNUSABLE" ';
LOOP
/* Fetch the next row, and stop if no more rows. */
FETCH cv INTO val;
EXIT WHEN cv%NOTFOUND;
EXECUTE IMMEDIATE 'ALTER INDEX MDM3.' || val || ' REBUILD ONLINE PARALLEL 7';
END LOOP;
CLOSE cv;
END;
/

=======================================
procedure gets created but getting syntax error during execution for the select stmt.

The following
+++++++++++++++++++++++++++++++++++++++++
CREATE OR REPLACE PROCEDURE index_rebuilt (
table_name IN VARCHAR2)
IS
TYPE cv_type IS REF CURSOR;
cv cv_type;
val VARCHAR2(32767);
BEGIN
/* Construct the very dynamic query and open the cursor. */
OPEN cv FOR
"select index_name from dba_indexes where table_name = ' || table_name ||
'and status = 'UNUSABLE' ";
LOOP
/* Fetch the next row, and stop if no more rows. */
FETCH cv INTO val;
EXIT WHEN cv%NOTFOUND;
EXECUTE IMMEDIATE 'ALTER INDEX MDM3.' || val || ' REBUILD ONLINE PARALLEL 7';
END LOOP;
CLOSE cv;
END;
/
=============================================
Geting arning during creation of procedure.

How do I use the single coates in the select stmt like above ???