I just starting to query XML within a SQL Server database. I am having trouble with the most basic query. Here is a simplified example. How do I return description? The SELECT statement below is what I am using, but it returns nothing.
SELECT Incidents.IncidentXML.query
('data(/dsIncident/IncidentInformation/Description)') AS Description
FROM Incidents
This is the snippet of the XML file that I am using:
<dsIncident xmlns="http://tempuri.org/dsIncident.xsd">
<IncidentInformation>
<Description>This is the description.</Description>
<Country>Singapore</Country>
</IncidentInformation>
</dsIncident>