I am trying to select just the "Value" in the column.
Column name is ResultParmsXML. Below is an example of data returned.
<Params><Param Name="The stuck resource" Value="SERVER01" /><Param Name="The stuck resource" Value="SERVER04" /><Param Name="The stuck resource" Value="SERVER06" /><Param Name="The stuck resource" Value="SERVER03" /><Param Name="The stuck resource" Value="SERVER02" /></Params>
here is what i have so far but only returns the first instance of the Value. As you can see above there could be multiple instances.
SELECT SUBSTRING(ResultParamsXML, PATINDEX('%Value=%',ResultParamsXML) +7, 12)
FROM Test_ResultsLog
where TestId=1000231
and ResultCode=1
order by RunTime desc
I am looking for results like this:
ResultParmsXML
WMVPDAXAPP02, WMVPDAXAPP04,WMVPDAXAPP05
WMVPDAXAPP01,WMVPDAXAPP02,WMVPDAXAPP03
Open in new window