[Solved] T-SQL get value from XML
You can do it using XQuery SELECT [TO] = t.XmlColumn.value(‘(ParameterValues/ParameterValue[Name/text() = “TO”]/Value/text())[1]’, ‘varchar(100)’) FROM YourTable t / is a child node navigation. [] is a predicate test on a particular node. So this looks for ParameterValues/ParameterValue which has a Name child with text TO and returns the Value child’s text. Note the use of text() … Read more