i have a field that data is stored in it with xml data type value :
<Inning xmlns="" ID="2866433" Company="Hamfekran">
<Test ID="rs232lon">
<Param Name="corel" Value="0.00000" />
<Param Name="co2rel" Value="10.8000" />
<Param Name="hcrel" Value="111.000" />
<Param Name="o2rel" Value="0.95000" />
</Test>
<Test ID="9" Name="CustomData">
<param Name="TireFront" Value="3.00" />
<param Name="TireBack" Value="2.00" />
</Test>
</Inning>
How could I get a result with TSQL like this :
corel co2rel hcrel o2rel TireFront TireBack
-----------------------------------------------------------------------------
0.00000 10.8000 111.000 0.95000 3.00 2.00
References:
The XML Methods in SQL Server
nodes() Method (xml Data Type)
value() Method (xml Data Type)
xml Data Type Methods