ORA-14400: inserted partition key does not map to any partition

Cause:

kIsH@Xhydra<>INSERT INTO "KISH"."RP"
SELECT xid.nextval,
       dbms_random.string('a','10'),
           floor(dbms_random.value(1,1000000)),
           to_date(trunc(dbms_random.value(to_char(date '1979-01-01','J'),
                                           to_char(date '9999-12-31','J'))),'J')
from dual connect by level <= 1000;
  2    3    4    5    6    7       SELECT xid.nextval,
       *
ERROR at line 2:
ORA-14400: inserted partition key does not map to any partition


kIsH@Xhydra<>
kIsH@Xhydra<>!oerr ora 14400
14400, 00000, "inserted partition key does not map to any partition"
// *Cause:  An attempt was made to insert a record into, a Range or Composite
//          Range object, with a concatenated partition key that is beyond
//          the concatenated partition bound list of the last partition -OR-
//          An attempt was made to insert a record into a List object with
//          a partition key that did not match the literal values specified
//          for any of the partitions.
// *Action: Do not insert the key. Or, add a partition capable of accepting
//          the key, Or add values matching the key to a partition specification

Action:

Modify the attributes in the columns based on the variables length during creation of partitioned table

--DDL 
(PARTITION "R_JAN2022"  VALUES LESS THAN (TO_DATE(' 2022-02-01 00:00:00', '
SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))  <<== date values provided below MAY-2022
PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
  2    3    4    5    6    7    8    9   10   11   12   13   14  NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "TBS1" ,
PARTITION "R_FEB2022"  VALUES LESS THAN (TO_DATE(' 2022-03-01 00:00:00', '
SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN')) <<==
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

kIsH@Xhydra<>
INSERT INTO "KISH"."RP"
kIsH@Xhydra<>  2  SELECT xid.nextval,
       dbms_random.string('a','10'),
           floor(dbms_random.value(1,1000000)),
           to_date(trunc(dbms_random.value(to_char(date '2022-01-01','J'), 
                                           to_char(date '2022-04-30','J'))),'J')
from dual connect by level <= 1000;                       3    4    5    6    7

1000 rows created.

kIsH@Xhydra<>commit;

Commit complete.

Leave a Reply