I have this XML:
<List>
<Attribute>
<Id>NAME</Id>
<Value>JOHN</Value>
</Attribute>
<Attribute>
<Id>CITY</Id>
<Value>NEW YORK</Value>
</Attribute>
</List>
Below is query:
SELECT EXTRACTVALUE(xml, "List/Attribute[Id[text()='NAME']]/Value")
FROM xx;
But getting error as
Unknown column 'List/Attribute[Id[text()='NAME']]/Value' in 'field list'.
I want to retrieve the value of NAME which should return as JOHN