Error message:
Parent tag ID 1 is not among the open tags. FOR XML EXPLICIT requires parent tags to be opened first. Check the ordering of the result set
Cause and solution:
Wrong Parent Tag:
Check the parent field, make sure that the parent is not NULL (instead of the root), and that the Parent ID is already created and/or it's among the open tags.
Comment out the FOR XML EXPLICIT part of the query to get the results and understand the ordering.
Maybe you need to add/remove/change the order of the tag and/or the parent fields in the ORDER BY part of the query.
No comments:
Post a Comment