XML : SQL FOR XML PATH: the identifier that starts with ... is too long. maximum length is 128

While trying to create xml result using FOR XML PATH in TSQL (2008) I stumbled upon this error:

the identifier that starts with ... is too long. maximum length is 128

The line it errors on is pretty deep and more than 128 characters long:

  GlobalTradeItemInformation/tradingPartnerNeutralTradeItemInformation/cataloguePrice/tradeItemPrice/priceBracket/@rangeUnitOfMeasure'    

Besides using a subselect with another for xml statement in it, what are the options to resolve this? For example, is this a setting in MS SQL which can be changed? Any other workarounds?

No comments:

Post a Comment