This example casts a column named XML but of type "text" into XML and then queries it: SELECT Loc.ID, Loc.Location_ID, CAST(Loc.XML as XML).query('/*/LocationID') FROM Locations Loc
SELECT Loc.ID, Loc.Location_ID, CAST(Loc.XML as XML).query('/*/LocationID') FROM Locations Loc