When i run
SELECT XMLElement("product",
XMLAttributes(fp.col2 AS "attr2",fp.col4 as "attr4",fp.col5 as "attr5",fp.col6 as "attr6")
XMLElement(SELECT (XMLElement("dataset",
XMLAttributes(ds.col3 AS "attr3")
FROM Table2 ds
WHERE fp.col1 = ds.col1 and fp.col2 = ds.col2 and ds.col2='ABC')) )
)
FROM Table2 fp
WHERE fp.col1 = 'XYZ'
I get error
ORA-00917: missing comma
00917. 00000 - "missing comma"
*Cause:
*Action:
Error at Line: 5 Column: 18
I am not able to understand why
I am expecting output like
<product>
<dataset></dataset>
</product>
also can you point me to tutorials / examples where xml is generated from joiing multiple tables. I need to have a closer look at syntax.
Most of the examples i searched for had xml generated from single table ( employee)