RATE THIS ANSWER
0
Click to Vote:
0
0
I do not know about putting in the XML tags - I know some version of DB2 will do it.
But ignoring the XML, I see two different ways to get the data.
1) are you in a program? if so, open a cursor against product table and for every row open a cursor against co0mments table and process the rows accordingly.
2) are you trying to do this in one SQL statement? then something like this will return your data columns (but again I am skipping the XML tags)
SELECT T1.PRODID, T1.DESCRIPTION, 0
FROM PRODUCT TABLE T1
UNION
SELECT T2.PRODID, T2.COMMENT, T2.COMMID
FROM COMMENTTABLE T2
ORDER BY 1,3
Last Answered:
Oct 19 2009 8:26 PM GMT by Meandyou 
1840 pts.