ORA-14291: cannot EXCHANGE a composite partition with a non-partitioned ta
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