Trouble Getting XML Data into relational format in SQL Server 2014
问题 I'm getting some XML data that I need to 'shred' (I think that's the right term). That is I need to put it into a SQL table. Here's an example, and a query that works, but I was told it was inefficient. Please let me know if you know a more efficient way to do this. Here's some example XML, 2 queries that don't work, and one that does: DECLARE @XmlReportParameters NVARCHAR (MAX) = N'<?xml version="1.0" encoding="utf-16"?> <Customers> <Customer> <Name>Sri Patel</Name> <FavColors> <FavColor>Red