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!

ORA-14291: cannot EXCHANGE a composite partition with a non-partitioned ta

user588395Aug 13 2007 — edited Aug 13 2007
How do I resolve the below issue. I need to create a temp table and then do a exchange partition to the temp table using certain condition . The main table
edc.edc_log_test has partition and subpartition. I used the below sql to create the temp table. How can I create the temp table with partition so that I do not get the mentioned error.

edc.edc_log_test has
PARTITION BY RANGE(CAPTURE_DATE)
SUBPARTITION BY LIST(TRAN_NBR)

l_ddl := 'create table ' || p_object_owner_in || '.' ||
p_part_subpart_name || ' as select * from ' ||
p_object_owner_in || '.' || p_object_name_in || ' where 1=2';

l_ddl := ' ALTER TABLE ' || p_object_owner_in || '.' ||
p_object_name_in || ' EXCHANGE PARTITION ' ||
p_part_subpart_name || ' WITH TABLE ' ||
p_object_owner_in || '.' || p_part_subpart_name ||
' EXCLUDING INDEXES WITHOUT VALIDATION '; *

ORA-14291: cannot EXCHANGE a composite partition with a non-partitioned table
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2007
Added on Aug 13 2007
3 comments
3,081 views