retrieving value from an xml field in the db

  • i have a memo field that stores data under a xml format:

    <?xml version='1.0'?> <table><field1>test</field1></table> <table><field2>test</field2></table>

    how can i retrieve in a function the value of the field, but passing it the table and/or the field name

    i have tried combination of substring and stuff, but seems too complicated

    any idea?

    tx!

  • Have you tried OpenXML function ?

  • Look into using the query() method from XQuery. In BOL it's "Query() method".

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply