Returning a Date Field from Column As Xs:dateTime in XMLQUERY Fails with ORA-7445 [LdiDateToString] (Doc ID 2067383.1)

Last updated on OCTOBER 16, 2015

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.

Symptoms

Returning a date field from a column as xs:dateTime in an XMLQUERY fails with the following error:

ORA-07445: exception encountered: core dump [LdiDateToString()+3686] [SIGFPE] [ADDR:0x25B772A] [PC:0x25B772A] [Integer divide by zero] []


Statement which fails:

SELECT XMLQUERY (
'declare function local:donothing($id as xs:decimal) as element()*
{
  let $d := fn:collection("oradb:/ABHINAVB/TEST_XMLQUERY_DATETIME")/ROW[COL1=$id]
  return {xs:dateTime($d/COL2)}
};
local:donothing(2)'
  RETURNING CONTENT)
  AS xm
 FROM DUAL d;

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