I want to get a Guardian (GRD) that has the lowest CaseParty@InternalPartyID and where Case/CaseParty/Connection/RemoveDate does not exist.
How do I do this because it has the lowest InternalPartyID = 1614672231
Expected result should be like this
my xml doc
How do I do this because it has the lowest InternalPartyID = 1614672231
Expected result should be like this
XML:
<CaseParty ID="16769136" InternalCasePartyID="1634788175" InternalPartyID="1614672231">
<Connection Word="GRD" BaseConnection="GD" ID="36381880" InternalCasePartyConnectionID="1636470565">
<Description>Guardian</Description>
<TimestampCreate>2/18/2015 4:27:54 PM</TimestampCreate>
<DateAdded>02/18/2015</DateAdded>
</Connection>
<CasePartyName Current="true" ID="10052180" InternalNameID="1615525304">
<NameType>Standard</NameType>
<NameFirst>Cindee</NameFirst>
<NameLast>Truesdell</NameLast>
<FormattedName>Truesdell, Cindee</FormattedName>
</CasePartyName>
</CaseParty>
my xml doc
XML:
<Integration xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:tsg="[URL unfurl="true"]http://tsgweb.com"[/URL] xmlns:IXML="[URL unfurl="true"]http://tsgweb.com"[/URL] xmlns:CMCodeQueryHelper="urn:CMCodeQueryHelper" PackageID="BCA PO Notification" MessageID="66595889" xmlns="">
<Case InternalID="1617088771" ID="12122866" xmlns:user="[URL unfurl="true"]http://tylertechnologies.com">[/URL]
<CaseParty ID="16769136" InternalCasePartyID="1634788175" InternalPartyID="1614672231">
<Connection Word="GRD" BaseConnection="GD" ID="36381880" InternalCasePartyConnectionID="1636470565">
<Description>Guardian</Description>
<TimestampCreate>2/18/2015 4:27:54 PM</TimestampCreate>
<DateAdded>02/18/2015</DateAdded>
</Connection>
<CasePartyName Current="true" ID="10052180" InternalNameID="1615525304">
<NameType>Standard</NameType>
<NameFirst>Cindee</NameFirst>
<NameLast>Truesdell</NameLast>
<FormattedName>Truesdell, Cindee</FormattedName>
</CasePartyName>
</CaseParty>
<CaseParty ID="16769137" InternalCasePartyID="1634788180" InternalPartyID="1614672232">
<SendNotice>true</SendNotice>
<RestrictView>false</RestrictView>
<ObservedRace Word="H">Native Hawaiian or Other Pacific Islander</ObservedRace>
<Connection Word="GRD" BaseConnection="GD" ID="36381885" InternalCasePartyConnectionID="1636470570">
<Description>Guardian</Description>
<TimestampCreate>2/18/2015 4:35:31 PM</TimestampCreate>
<DateAdded>02/18/2015</DateAdded>
</Connection>
<CasePartyName Current="true" ID="10052181" InternalNameID="1615525305">
<NameType>Standard</NameType>
<NameFirst>Regina</NameFirst>
<NameLast>Sedar</NameLast>
<FormattedName>Sedar, Regina</FormattedName>
</CasePartyName>
</CaseParty>
</Case>
</Integration>