IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 1 reply
  • Latest Post - ‏2013-03-09T01:30:34Z by MatthiasNicola
SystemAdmin
SystemAdmin
230 Posts

Pinned topic XMLTABLE SQLCODE=-16003

‏2013-03-08T22:56:30Z |
Any help appreciated in resolving this error:

select dom.*
from sde.gdb_items itm
,XMLTABLE('$D/GPCodedValueDomain2' passing itm.definition as "D"
COLUMNS
OWNER VARCHAR(30) PATH 'Owner'
,DOMAIN_NAME VARCHAR(40) PATH 'DomainName'
,DOMAIN_DESC VARCHAR(60) PATH 'Description'
,CODE VARCHAR(20) PATH 'CodedValues/CodedValue/Code'
,CODE_DESC VARCHAR(60) PATH 'CodedValues/CodedValue/Name'
) AS DOM
where itm.type IN (SELECT uuid FROM sde.gdb_itemtypes WHERE name in ( 'Range Domain', 'Coded Value Domain') )
and xmlexists('$D/GPCodedValueDomain2' passing itm.definition as "D")

An expression of data type "( item(), item()+ )" cannot be used when the data type "VARCHAR_60" is expected in the context. Error QName=err:XPTY0004.. SQLCODE=-16003, SQLSTATE=10507, DRIVER=3.64.106

Sample document in "definition" column:
<GPCodedValueDomain2 xsi:type="typens:GPCodedValueDomain2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:typens="http://www.esri.com/schemas/ArcGIS/10.1">
<DomainName>TMTBL_DIR_DOM</DomainName>
<FieldType>esriFieldTypeString</FieldType>
<MergePolicy>esriMPTDefaultValue</MergePolicy>
<SplitPolicy>esriSPTDefaultValue</SplitPolicy>
<Description>Timetable direction codes</Description>
<Owner>ZDCOGIS</Owner>
<CodedValues xsi:type="typens:ArrayOfCodedValue">
<CodedValue xsi:type="typens:CodedValue">
<Name>West</Name>
W </CodedValue>
<CodedValue xsi:type="typens:CodedValue">
<Name>East</Name>
E </CodedValue>
<CodedValue xsi:type="typens:CodedValue">
<Name>North</Name>
N </CodedValue>
<CodedValue xsi:type="typens:CodedValue">
<Name>South</Name>
S </CodedValue>
</CodedValues>
</GPCodedValueDomain2>
Updated on 2013-03-09T01:30:34Z at 2013-03-09T01:30:34Z by MatthiasNicola