DB2 - Problem description
| Problem IC75576 | Status: Closed |
A SQL16082N COULD BE INCORRECTLY THROWN WHEN DOING AN XML UPDATE ON A NEWLY CONSTRUCTED XML DOCUMENT | |
| product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
| Problem description: | |
The following error could be incorrectly thrown by queries
performing an XML Update on a document that was newly
constructed.
SQL16082N A target node in one or more replace value of
expressions is not a
node that was newly created in the copy clause of the transform
expression.
Error QName=err:XUDY0014. SQLSTATE=10703
This condition will normally happen when we have many element
siblings under one element parent and the element we are trying
to
update is found at the end of the document.
Sample Query:
select
xmlquery('copy $new := $XMLDOC
modify do replace value of
$new/*:ReconciliationExtract/*:AgentTotal
with
$new/*:ReconciliationExtract/count(*:ReconciliationAgent)
return $new
')
from
(
SELECT
XMLDOCUMENT(
XMLELEMENT(NAME "six:ReconciliationExtract",
XMLNAMESPACES(
'http://v1.six.informationmodel.esb.scottishwidows.co.uk'
AS "six",
'http://www.w3.org/2001/XMLSchema-instance'
AS "xsi"
),
XMLATTRIBUTES('http://v1.six.informationmodel.esb.scottishwidows
.co.uk
SIX.xsd' AS "xsi:schemaLocation"),
XMLELEMENT(NAME "six:ExtractDate", CURRENT TIMESTAMP),
XMLAGG(
XMLELEMENT(NAME "six:ReconciliationAgent",
XMLFOREST(
T0040.AGENTA_KEY AS "six:AgentNumber",
RTRIM(T0040.AGNAME) AS "six:AgentName",
T0040.AGSIBNO AS "six:SIBNumber",
T0040.APPOINTED_REP_FRN AS "six:AppRepFRN",
RTRIM(T0040.AGTN) AS "six:Town",
T0040.AMS_ID AS "six:AMSID",
T0040.MAPPING_STATUS AS
"six:MappingStatus"
)
)
),
XMLELEMENT(NAME "six:AgentTotal",0)
)
) as xmldoc
from
DBCDI001.T0040AGENTA T0040
where
t0040.mapping_status in ('3','4')
) AS X
#
The above problem observed in DB2 V9.5 all fixpacks | |
| Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * Prior to version DB2 V9.7 FP5 * **************************************************************** * PROBLEM DESCRIPTION: * * A SQL16082N COULD BE INCORRECTLY THROWN WHEN DOING AN XML * * UPDATE * * ON A NEWLY CONSTRUCTED XML DOCUMENT * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 V9.7 FP5 * **************************************************************** | |
| Local Fix: | |
| available fix packs: | |
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows | |
| Solution | |
First Fixed in DB2 V9.7 FP5 | |
| Workaround | |
not known / see Local fix | |
| Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 05.04.2011 30.01.2012 30.01.2012 |
| Problem solved at the following versions (IBM BugInfos) | |
9.7.FP5 | |
| Problem solved according to the fixlist(s) of the following version(s) | |
| 9.7.0.5 |
|