I am exporting xml from SQL Server 2000 using a FOR XML EXPLICIT query. It i
s
quite a big query: 56 SELECTs unions together and each one has 57 columns.
When I run it, I get the following error...
Server: Msg 6806, Level 16, State 2, Procedure DebitNotes_XmlDoc2, Line 10
Undeclared tag ID 50 is used in a FOR XML EXPLICIT query.
By the way, if I remove "FOR XML EXPLICIT", the remaining part works.
Does anyone know what that error means ?
Thanks,
CraigMake sure you have a suitable ORDER BY clause at the end of your query.|||I tried adding "ORDER BY Tag" but I still got the same error. I added it jus
t
before the "FOR XML EXPLICIT".
Is that right ? Or should I be doing something else ?|||The ORDER BY clause will be dependent upon the rest of the query,
perhaps you could post your query (or a cut down version of it
if it is very big)|||The order by needs to make sure that the parent element is immediately
followed by its children.
The error message that you see means that a child element appears before its
parent.
Best regards
Michael
<markc600@.hotmail.com> wrote in message
news:1122495791.208708.274880@.g47g2000cwa.googlegroups.com...
> The ORDER BY clause will be dependent upon the rest of the query,
> perhaps you could post your query (or a cut down version of it
> if it is very big)
>|||I have checked this and all parent elements are immediately followed by its
children.|||Can you provide a repro case then?
Thanks
Michael
"Craig HB" <CraigHB@.discussions.microsoft.com> wrote in message
news:E27D6043-CE20-4BE8-816E-677A7B015D6B@.microsoft.com...
>I have checked this and all parent elements are immediately followed by its
> children.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment