I have not worked with XML in the database before so I need some help.
I need to get the value where name equals “sv-SE” from the XML for a number of rows.
XML looks like this:
Row 1
<cultures>
<culture name="sv-SE">Sverige</culture>
<culture name="en-GB">Sweden</culture>
</cultures>
Row 2
<cultures>
<culture name="sv-SE">Norge</culture>
<culture name="en-GB">Norway</culture>
</cultures>
Expected output from this query would be
Sverige
Norge
When the name is “sv-SE”
select tblCountry.name.?? --XmlColumn
from tblCountry
If you want different languages without rewriting the query you can use the
sql:variablefunction.