1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
select
xmlRoot(
xmlElement(name "lescommandes",
XMLAgg(XMLElement(name "commande",
XMLAttributes(commande.idcde),
XMLElement(name "datecommande", commande.datecde),
XMLAgg(XMLElement(name "LigneCde",
XMLForest(produit.idprod AS "id",
produit.libprod AS "libelle",
prodcde.qte AS "qteCommande")
) )
))),version ''1.0" encoding="iso-8859-1''))getClobVal() AS RESULTAT
FROM commande INNER JOIN prodcde ON prodcde.idcde = commande.idcde
INNER JOIN produit ON produit.idprod = prodcde.idprod
GROUP BY commande.idcde, commande.datecde; |