SET @XmlData='<options>
<option>
<name>Model</name>
<option_info>
<item>
<itemoption_id>5276</itemoption_id>
<itemoption_itemid>4566</itemoption_itemid>
<itemoption_weight>0</itemoption_weight>
<itemoption_description><![CDATA[Black Flash 1873 Watts 240 Volts]]></itemoption_description>
<itemoption_size>16 x 16</itemoption_size>
<itemoption_modifyprice>25.00</itemoption_modifyprice>
<itemoption_shiprule>1</itemoption_shiprule>
</item>
<item>
<itemoption_id>5276</itemoption_id>
<itemoption_itemid>4566</itemoption_itemid>
<itemoption_weight>0</itemoption_weight>
<itemoption_description><![CDATA[Black Flash 1973 Watts 220 Volts]]></itemoption_description>
<itemoption_size>16 x 16</itemoption_size>
<itemoption_modifyprice>25.00</itemoption_modifyprice>
<itemoption_shiprule>1</itemoption_shiprule>
</item>
</option_info>
</option>
<option>
<name>Acc.</name>
<option_info>
<item>
<itemoption_id>5561</itemoption_id>
<itemoption_itemid>4708</itemoption_itemid>
<itemoption_weight>0</itemoption_weight>
<itemoption_description><![CDATA[Black Flash Floor Stand]]></itemoption_description>
<itemoption_size></itemoption_size>
<itemoption_modifyprice>215.00</itemoption_modifyprice>
<itemoption_shiprule>1</itemoption_shiprule>
</item>
</option_info>
</option>
</options>'
select
R.i.query('name').value('.', 'varchar(30)') [Name], R.i.query('option_info/item/itemoption_description[1]').value('.', 'varchar(100)') [itemoption_description]
FROM @XmlData.nodes('/options/option') R(i)
|