This SQL query works just fine for me:
select ID, USERID, LENGTH, WIDTH, HEIGHT, SURFACE, VOLUME, VIEW_PEN_ID, SECTION_PEN_ID, LINETYPE_ID, FILLTYPE_ID, FILL_PEN_ID, FILL_BG_PEN_ID, MATERIAL_ID, LAYER_ID, LIBRARY_PART_NAME, BASE_ELEVATION, LABEL_ID, STORY_ID
from OBJECTS
where LIBRARY_PART_NAME = 'abracadabra_2010'
Among other results, it shows the OBJECTS.ID for 'abracadabra_2010' is '586B7EA9-609A-4827-B30C-1F33CD1388D0'
This next SQL query fails with error message "Listing error. Failed to write query result to XML"
SELECT PP.PARAMETERS.NAME, PP.PARAMETERS.VARIABLE_NAME, PP.PARAMETERS.TYPE, PP.PARAMETERS.VALUE
FROM FLAT(OBJECTS, PARAMETERS) AS PP
WHERE OBJECTS.ID = '586B7EA9-609A-4827-B30C-1F33CD1388D0'
The syntax appears ok, since it has been used many times before and the following query performs as expected:
SELECT OBJECTS.USERID, OBJECTS.ID
FROM OBJECTS
WHERE OBJECTS.ID = '586B7EA9-609A-4827-B30C-1F33CD1388D0'
Does anyone know why the results cannot be written to an XML output? It appears to happen just for this particular, long-used, object. Schedule reports involving the object work as expected.