I have XML like so
<OrchestrationConfiguration>
<Instrument>
<Spectrometer>
<Inputs>
<Channel-ChannelNumber-1>
<ChannelNumber>1</ChannelNumber>
<ChannelName>Answer01</ChannelName>
</Channel-ChannelNumber-1>
</Inputs>
<Outputs>
<Channel-ChannelNumber-1>
<ChannelNumber>1</ChannelNumber>
<ChannelName>1</ChannelName>
<ChannelName>2</ChannelName>
<ChannelName>3</ChannelName>
<ChannelName>4</ChannelName>
<ChannelName>5</ChannelName>
<ChannelName>6</ChannelName>
<ChannelName>7</ChannelName>
<ChannelName>8</ChannelName>
<ChannelName>9</ChannelName>
<ChannelName>10</ChannelName>
</Channel-ChannelNumber-1>
<Channel-ChannelNumber-2>
<ChannelNumber>2</ChannelNumber>
<ChannelName>Temperature-K</ChannelName>
</Channel-ChannelNumber-2>
<Channel-ChannelNumber-3>
<ChannelNumber>3</ChannelNumber>
<ChannelName>Pressure-inHg-absolute</ChannelName>
</Channel-ChannelNumber-3>
</Outputs>
</Spectrometer>
</OrchestrationConfiguration>
In my SSRS report. I have created a list grouped by Parent Name and to get the outputs I have applied the following filters
The issue I am having is to get the Inputs. I am unable to distinguish between Outputs and Inputs as the filter is the same. Is there any other way of doing this? I am happy to change the format of XML if required.
I am using the XMLTable function to shred the xml. Shred XML
Notes which might help
- I am using SQL Server 2014.
- The above XML is present in a database table in SQL.