У меня есть столбец xml в таблице, и я хочу проанализировать xml и вставить значения в новую таблицу
Как вставить значения XML в таблицу?
CREATE TABLE [dbo].[PubmedMeshDescriptors](
[ID] [int] IDENTITY(1,1) NOT NULL,
[PMID] [int] NULL,
[Descriptor] [nvarchar](400) NULL,
[DescriptorIsMajor] [char](1) NULL,
[Qualifier] [nvarchar](400) NULL,
[QualifierIsMajor] [char](1) NULL
)
и столбец xml в другой таблице выглядит следующим образом
<MedlineCitation Owner="NLM" Status="MEDLINE">
<PMID Version="1">1</PMID>
<MeshHeadingList>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Aldehyde Oxidoreductases</DescriptorName>
<QualifierName MajorTopicYN="N">metabolism</QualifierName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Animals</DescriptorName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Carbon Dioxide</DescriptorName>
<QualifierName MajorTopicYN="N">blood</QualifierName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Formates</DescriptorName>
<QualifierName MajorTopicYN="N">blood</QualifierName>
<QualifierName MajorTopicYN="Y">poisoning</QualifierName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Haplorhini</DescriptorName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Hydrogen-Ion Concentration</DescriptorName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Methanol</DescriptorName>
<QualifierName MajorTopicYN="N">blood</QualifierName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Methods</DescriptorName>
</MeshHeading>
<MeshHeading>
<DescriptorName MajorTopicYN="N">Pseudomonas</DescriptorName>
<QualifierName MajorTopicYN="N">enzymology</QualifierName>
</MeshHeading>
</MeshHeadingList>
</MedlineCitation>
как я могу сделать это с помощью SQL-запроса?