I was attempting to make a stored procedure to rebuild some indexes on a ginormous table I have to refresh monthly.
create or replace
ALTER INDEX "VALIDATION_TOOLS"."PX_NPI" REBUILD;
I get this error when I try to compile:
Error(6,3): PLS-00103: Encountered the symbol "ALTER" when expecting one of the following: ( begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << continue close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe purge
Can I not put the rebuild in a procedure?