I have to create queries on a SQL Server database that stores the relevant data attributes for each line in a single XML column. The list of attributes in that column is formatted like this:
<Attributes>
<A N="FRUIT">APPLE</A>
<A N="COLOR">RED</A>
</Attributes>
I have to parse that column so that instead I have a column for each attribute (So I'd have a column for FRUIT and one for COLOR). I'm aware of some shredding methods, but I don't know how to reformat the column so that the attribute names can be extracted.