I want to select elements other than the elements whose InEx value is 'Excluded'.
Here is my XML document:
<MachineStatus>
<ShiftStop MachineName="01" InEx="Excluded" />
<ShiftStop MachineName="01" InEx="Included" />
<ShiftStop MachineName="01" InEx="Included" />
</MachineStatus>
I need to get
<ShiftStop MachineName="01" InEx="Included" />
<ShiftStop MachineName="01" InEx="Included" />
I tried this query but it does not work.
SELECT [Entity].query('/MachineStatus/ShiftStop') FROM [FES].[SMD].[Machine] WHERE
[Entity].value('(/MachineStatus/ShiftStop/@InEx)[1]','varchar(10)') != 'Excluded'