![]() When instead of strings we are about to aggregate the CLOB values using XMLAGG function then we can make the use of xmlparse which will accept the XML text and will transform it into a datatype of XMLTYPE. When the strings are to be aggregated then we can use the “.extract(‘//text()’)” which will keep the string together in XML and the rtrim() function can be used along with it to get rid of the trailing commas or spaces. The syntax can also be understood from the following figure –Īs the XMLAGG function returns the result in a single row or cell to wrap around all the element tags inside a single parent tag we can optionally make the use of XML_ELEMENT which will help to get all the result enclosed in a new parent tag or inside a single element which is created by it. The syntax of the XMLAGG function is as shown below – Hadoop, Data Science, Statistics & others
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |