How can I query a value in SQL Server XML column
select Roles from MyTable where Roles.value(‘(/root/role)[1]’, ‘varchar(max)’) like ‘StringToSearchFor’ In case your column is not XML, you need to convert it. You can also use other syntax to query certain attributes of your XML data. Here is an example… Let’s suppose that data column has this: <Utilities.CodeSystems.CodeSystemCodes iid=”107″ CodeSystem=”2″ Code=”0001F” CodeTags=”-19-“…./> … and you only … Read more