Below alter sql runs fine when i run this alone.
ALTER TABLE table_name TRUNCATE partition partition_nm UPDATE GLOBAL INDEXES;
But If I run this from procedure I am getting error message, "14054. 00000 - invalid ALTER TABLE TRUNCATE PARTITION option"
create or replace PROCEDURE TRUNCATE_WS_CLAIMS_REPORT
as
crsor integer;
rval integer;
begin
crsor := dbms_sql.open_cursor;
dbms_sql.parse(crsor, ALTER TABLE table_name TRUNCATE partition partition_nm UPDATE GLOBAL INDEXES',dbms_sql.v7);
rval := dbms_sql.execute(crsor);
dbms_sql.close_cursor(crsor);
end;
Can you guide me how to resolve this error?