我有一個存儲xml的Oracle DB CLOB字段。我需要使用DistributionNbr標記檢索所有xml中的所有值我已經對以下查詢使用了相同的參數,併爲ref提供了一個示例xml。從定界符分隔的oracle db中提取clob的值
select extract(xmltype(column_name),'//*/xmlpath/text()').getStringval() as g
from table;
<xml>
<ShipConfirm>
<ShipmentID>000000196</ShipmentID>
</ShipConfirm>
<ShipConfirm>
<ShipmentID>000000197</ShipmentID>
</ShipConfirm>
<ShipConfirm>
<ShipmentID>000000198</ShipmentID>
</ShipConfirm>
</xml>
現在我得到的值作爲一個字符串:000000196000000197000000198
我需要在下一行逗號分隔值或值。 000000196,000000197,000000198
OR
000000196
000000197
000000198
查看LIVESQL在這裏https://livesql.oracle.com/apex/livesql/file/content_E7E0NODMZ5BTXA3BXNF2XFB14.html –
非常感謝你 – jabbars