Home Forums SQL Server 2008 T-SQL (SS2K8) Trying to select XML data for one tag from an text field and isn't returning the data I need RE: Trying to select XML data for one tag from an text field and isn't returning the data I need

  • davidsalazar01 (2/12/2013)


    Lowell,

    It's only one occurence (e.g.<DID>) in the XML and your right I only want the data between the tags. Would the samples you posted do the trick? I appreciate your help!

    Thanks,

    David

    yes it would do it, and is prepared for the other things i mentioned as well: multiple DID tags, and attributes in the opening <did tag as well.

    grab the function from this article, and read the article so you can understand what it does; it's a very powerful tool to put in your toolkit.

    Tally OH! An Improved SQL 8K “CSV Splitter” Function[/url]

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!