0
我已经存储在数据库字段中输入以下XML数据:提取XML标记值甲骨文
<FM>
<SectionsList>
<Section>
<SectionId>Section_one</SectionId>
</Section>
<Section>
<SectionId>Section_two</SectionId>
<Fields>
<FormField>
<FieldId>REQUESTID</FieldId>
<FieldValue>ABC1234</FieldValue>
</FormField>
<FormField>
<FieldId>REQUESTNAME</FieldId>
<FieldValue>JASMINE</FieldValue>
</FormField>
</Fields>
</Section>
</SectionsList>
</FM>
我想要检索的FieldValue
具有的REQUESTNAME
FieldId
FormField
标签从部分具有SectionId
值Section_two
。结果应该是JASMINE
。
我在甲骨文执行查询为:
SELECT EXTRACTVALUE(xmltype(req_details),
'/FM/SectionsList/Section[@SectionId="Section_two"]/Fields/FormField/FieldValue[@FieldId="REQUESTNAME"]')
from table
但结果为NULL。我如何提取Oracle中的值?
完美...谢谢:) – user2114865