My database version is Oracle 8.1.7 under Win2K.

The procedure I was trying to create should be able to change the tablespace for all indexes that an user has.

CREATE or REPLACE procedure chg_ind_tbs as
cursor c1 is select index_name from user_indexes;
BEGIN
FOR result IN C1 LOOP
ALTER INDEX result rebuild tablespace tbs_name;
END LOOP;
END;