Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Invalid ALTER TABLE TRUNCATE PARTITION option

2679540May 30 2014 — edited May 30 2014

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?

This post has been answered by Hoek on May 30 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 27 2014
Added on May 30 2014
2 comments
1,083 views