Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SQL Server 2005 with Xquery

Options
  • 22-11-2010 6:44pm
    #1
    Registered Users Posts: 2,791 ✭✭✭


    Hi,

    I have a field that contains XML data from DTS packages. I need to filter down the packages in the XML to ones that were only created by Excel.

    Here's a chunk of the XML that I'm trying to get. There are a number of these sections contained in the XML root but I trimmed it down to just one.
    <DTS:ConnectionManager xmlns:DTS="www.microsoft.com/SqlServer/Dts">
      <DTS:Property DTS:Name="DelayValidation">0</DTS:Property>
      <DTS:Property DTS:Name="ObjectName">BGNDER1.DST_USER</DTS:Property>
      <DTS:Property DTS:Name="DTSID">{7FCF0E05-93D3-43ED-9FBB-001FFBB2C76B}</DTS:Property>
      <DTS:Property DTS:Name="Description" />
      <DTS:Property DTS:Name="CreationName">EXCEL</DTS:Property>
      <DTS:ObjectData>
        <DTS:ConnectionManager>
          <DTS:Property DTS:Name="Retain">0</DTS:Property>
          <DTS:Password DTS:Name="Password" Sensitive="1" Encrypted="1">AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAu770DM8V2U+apqMxnqpa9gAAAAAIAAAARABUAFMAAAADZgAAqAAAABAAAACiI+bvYVuBEvLxnjJmlPl0AAAAAASAAACgAAAAEAAAAIK9G+8jvT5iZEdW6cMLu/MIAAAA96u8pvlHcBoUAAAADB07UGKGy2J6cq36Q/3c+IYQlMM</DTS:Password>
          <DTS:Property DTS:Name="ConnectionString">Data Source=BGNDER1;User ID=DST_USER;Provider=OraOLEDB.Oracle.1;Persist Security Info=False;</DTS:Property>
        </DTS:ConnectionManager>
      </DTS:ObjectData>
    </DTS:ConnectionManager>
    
    I'm having problems forming an Xquery that filters the results down to only sections like the above, where the value for the CreationName element is "Excel".

    Would really appreciate your help on this as I've been at it a few hours and getting nowhere :confused:


Advertisement