XML Data Insert SQL Failed with ORA-30992 And ORA-01830 (Doc ID 1610880.1)

Last updated on FEBRUARY 21, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

While running following xml data insert script failed with following errors:

SQL> insert into book_entity values(xmltype('<Book>
       <BookId>123</BookId>
       <FirstVersionDate>2011-04-01T02:13:00Z</FirstVersionDate>
       <SecondVersionDate effectiveFrom="2012-04-01T02:13:00Z">2013-04-01T02:13:00Z</SecondVersionDate>
</Book>'));  2    3    4    5
insert into book_entity values(xmltype('<Book>
                              *
ERROR at line 1:
ORA-30992: error occurred at Xpath /Book/SecondVersionDate[1][@SYS_XDBBODY$]
ORA-01830: date format picture ends before converting entire input string

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms