I have a table that contains a column of XML Datatype (column name FileContent). I want to create a view that queries the contents of the XML datatype column so that I no longer have FileContent column but two additional columns called FuelPathwayCode and PhysicalPathwayCode from the underlying XML document. Is this possible with SQL Server 2008? And, if so, how? Thanks.
CREATE VIEW vw_LC_UploadXML
AS Select
UploadFileID,
Year,
Quarter,
CompanyID,
FileType,
FileContent,
FileName,
Description,
Success,
AddBy,
AddDttm
FROM LC_UploadXML