I have a table, T1, with a XML column, EventXML, on SQL Server 2008. I want to query all the rows where certain node contains a particular value. Better, I'd like to retrieve the value in a different node. The table T1:
T1:
EventID, int
EventTime, datetime
EventXML, XML
Here is an example XML hierarchy:
<Event>
<Indicator>
<Name>GDP</Name>
</Indicator>
<Announcement>
<Value>2.0</Value>
<Date>2012-01-01</Date>
</Announcement>
</Event>
- How to find all the rows related to "GDP" Indicator;
- How to get all values for "GDP" Indicator;