I have an XML Store in SQL Server with the following structure:

<ecHeaderData>
<FirstVersionSource>System1</FirstVersionSource>
<DMSEntryUserID>jsmith</DMSEntryUserID>
</ecHeaderData>

I want to return all rows where DMSEntryUserID is not blank and FirstVersionSource equals System1. I want to select both the FirstVersionSource and DMSEntryuserID in the query.

Something like this:

select deal_jacket_xml('/ecHeader/FirstVersionSource') as FirstVersionSource,
deal_jacket_xml('/ecHeader/DMSEntryUserID') as DMSEntryUserID
from deal_jacket_xml
where deal_jacket_xml('NotBlank(/ecHeader/DMSEntryUserID'))=1
deal_jacket_xml('Contains(/ecHeader/FirstVersionSource'))=1
order by [deal_jacket_xml_id] desc