Parent not open: '%1'

Error constant SQLE_EXPLICIT_TAG_NOT_OPEN
ODBC 2 State ERROR
ODBC 3 State ERROR
Parameter 1 The parent tag ID that is not among the open tags.
Severity 16
SQLCODE –900
SQLSTATE WX008
Sybase error code 13581
Probable cause

FOR XML EXPLICIT requires the parent tag for a row to be opened when that row is read. Check the order of the rows returned by the query with the FOR XML EXPLICIT clause removed.