I have an SQLite 3.38.2 table that has XML tags in a column:
with cte(xml_tag) as (values
('<Event time="Sat Apr 22 1:01:51.887" type="Debug" thread="2164: Main CIM worker thread" elapsed="1" function="Geodatabase.Cursor" code="EndCursor">'),
('<Event time="Sat Apr 22 1:01:51.883" type="Debug" thread="2164: Main CIM worker thread" elapsed="23" function="Geodatabase.Cursor" code="EndCursor">'),
('<Event time="Sat Apr 22 1:01:51.874" type="Debug" thread="2164: Main CIM worker thread" elapsed="456" function="Geodatabase.Cursor" code="EndCursor">'),
('<Event time="Sat Apr 22 1:01:51.846" type="Debug" thread="2164: Main CIM worker thread" elapsed="7890" function="Geodatabase.Cursor" code="EndCursor">'))
select * from cte
I want to extract the values from the elapsed
tag as numbers:
elapsed
-------
1
23
456
7890
How can I extract the values from that XML tag using a SQL query?