1
select extractvalue( SELECT CONCAT("'",(SELECT LCASE('<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resp>
<dlrdtls>
<MessageId>43745973-737b-4c71-926f-797c0c9407a6</messageid>
<deliverystatus>failed</deliverystatus>
</dlrdtls>
</resp>')),"'"),'/resp/dlrdtls/messageid')  
as id ;

我想提取标签 MessageId 的值。

4

1 回答 1

1

删除内部SELECT语句,例如

SELECT EXTRACTVALUE(CONCAT("'",(LCASE('<?xml version="1.0" encoding="utf-8" standalone="no"?>
<resp>
<dlrdtls>
<MessageId>43745973-737b-4c71-926f-797c0c9407a6</messageid>
<deliverystatus>failed</deliverystatus>
</dlrdtls>
</resp>')),"'"),'/resp/dlrdtls/messageid')  
AS id ;

查询以这种方式工作,但实际上CONCAT也不需要该功能

于 2015-08-28T11:29:35.630 回答