Advertisement
ExaGridDba

timestamp range partition boundary to max 6 decimal places

May 7th, 2015
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. > DROP TABLE ts
  2. TABLE TS dropped.
  3. > CREATE TABLE ts ( ts TIMESTAMP, n NUMBER )
  4. PARTITION BY RANGE ( ts)
  5. ( PARTITION p1 VALUES less than  (
  6. TO_TIMESTAMP(' 2015-03-01 00:00:00.123456789', 'SYYYY-MM-DD HH24:MI:SS.ff9', 'NLS_CALENDAR=GREGORIAN')
  7. )  )
  8. TABLE TS created.
  9. > INSERT INTO ts ( ts ) VALUES (
  10. TO_TIMESTAMP(' 2015-03-01 00:00:00.123456000', 'SYYYY-MM-DD HH24:MI:SS.ff9', 'NLS_CALENDAR=GREGORIAN')
  11. )
  12. 1 ROWS inserted.
  13. > INSERT INTO ts ( ts ) VALUES (
  14. TO_TIMESTAMP(' 2015-03-01 00:00:00.123456700', 'SYYYY-MM-DD HH24:MI:SS.ff9', 'NLS_CALENDAR=GREGORIAN')
  15. )
  16.  
  17. Error starting AT line 13 IN command:
  18. INSERT INTO ts ( ts ) VALUES (
  19. TO_TIMESTAMP(' 2015-03-01 00:00:00.123456700', 'SYYYY-MM-DD HH24:MI:SS.ff9', 'NLS_CALENDAR=GREGORIAN')
  20. )
  21. Error report:
  22. SQL Error: ORA-14400: inserted PARTITION KEY does NOT map TO ANY PARTITION
  23. 14400. 00000 -  "inserted partition key does not map to any partition"
  24. *Cause:    An attempt was made TO INSERT a RECORD INTO, a RANGE OR Composite
  25.            RANGE object, WITH a concatenated PARTITION KEY that IS beyond
  26.            the concatenated PARTITION bound list OF the LAST PARTITION -OR-
  27.            An attempt was made TO INSERT a RECORD INTO a List object WITH
  28.            a PARTITION KEY that did NOT match the literal VALUES specified
  29.            FOR ANY OF the partitions.
  30. *Action:   DO NOT INSERT the KEY. OR, ADD a PARTITION capable OF accepting
  31.            the KEY, OR ADD VALUES matching the KEY TO a PARTITION specification
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement